Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220569
b: refs/heads/master
c: a0cadc2
h: refs/heads/master
i:
  220567: 4d459fd
v: v3
  • Loading branch information
Linus Torvalds committed Oct 28, 2010
1 parent 8f78c3a commit 11c85e4
Show file tree
Hide file tree
Showing 31 changed files with 1,358 additions and 191 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad1d3a26cdb9a0eaa0bf8351a000df0f256b0baa
refs/heads/master: a0cadc2777a71b1fde62e6417284b38e52128e88
7 changes: 7 additions & 0 deletions trunk/Documentation/kbuild/makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,13 @@ This will delete the directory debian, including all subdirectories.
Kbuild will assume the directories to be in the same relative path as the
Makefile if no absolute path is specified (path does not start with '/').

To exclude certain files from make clean, use the $(no-clean-files) variable.
This is only a special case used in the top level Kbuild file:

Example:
#Kbuild
no-clean-files := $(bounds-file) $(offsets-file)

Usually kbuild descends down in subdirectories due to "obj-* := dir/",
but in the architecture makefiles where the kbuild infrastructure
is not sufficient this sometimes needs to be explicit.
Expand Down
4 changes: 2 additions & 2 deletions trunk/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ PHONY += missing-syscalls
missing-syscalls: scripts/checksyscalls.sh FORCE
$(call cmd,syscalls)

# Delete all targets during make clean
clean-files := $(addprefix $(objtree)/,$(filter-out $(bounds-file) $(offsets-file),$(targets)))
# Keep these two files during make clean
no-clean-files := $(bounds-file) $(offsets-file)
33 changes: 13 additions & 20 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1137,21 +1137,13 @@ MRPROPER_FILES += .config .config.old .version .old_version \
#
clean: rm-dirs := $(CLEAN_DIRS)
clean: rm-files := $(CLEAN_FILES)
clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation)
clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation)

PHONY += $(clean-dirs) clean archclean
$(clean-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)

clean: archclean $(clean-dirs)
$(call cmd,rmdirs)
$(call cmd,rmfiles)
@find . $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
-o -name '*.symtypes' -o -name 'modules.order' \
-o -name modules.builtin -o -name '.tmp_*.o.*' \
-o -name '*.gcno' \) -type f -print | xargs rm -f
clean: archclean

# mrproper - Delete all generated files, including .config
#
Expand Down Expand Up @@ -1352,16 +1344,7 @@ $(clean-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)

clean: rm-dirs := $(MODVERDIR)
clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers \
$(KBUILD_EXTMOD)/modules.order \
$(KBUILD_EXTMOD)/modules.builtin
clean: $(clean-dirs)
$(call cmd,rmdirs)
$(call cmd,rmfiles)
@find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
-o -name '*.gcno' \) -type f -print | xargs rm -f
clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers

help:
@echo ' Building external modules.'
Expand All @@ -1378,6 +1361,16 @@ prepare: ;
scripts: ;
endif # KBUILD_EXTMOD

clean: $(clean-dirs)
$(call cmd,rmdirs)
$(call cmd,rmfiles)
@find $(or $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
-o -name '*.symtypes' -o -name 'modules.order' \
-o -name modules.builtin -o -name '.tmp_*.o.*' \
-o -name '*.gcno' \) -type f -print | xargs rm -f

# Generate tags for editors
# ---------------------------------------------------------------------------
quiet_cmd_tags = GEN $@
Expand Down
15 changes: 15 additions & 0 deletions trunk/drivers/regulator/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ config REGULATOR_MAX8925
help
Say y here to support the voltage regulaltor of Maxim MAX8925 PMIC.

config REGULATOR_MAX8952
tristate "Maxim MAX8952 Power Management IC"
depends on I2C
help
This driver controls a Maxim 8952 voltage output regulator
via I2C bus. Maxim 8952 has one voltage output and supports 4 DVS
modes ranging from 0.77V to 1.40V by 0.01V steps.

config REGULATOR_MAX8998
tristate "Maxim 8998 voltage regulator"
depends on MFD_MAX8998
Expand Down Expand Up @@ -164,6 +172,13 @@ config REGULATOR_LP3971
Say Y here to support the voltage regulators and convertors
on National Semiconductors LP3971 PMIC

config REGULATOR_LP3972
tristate "National Semiconductors LP3972 PMIC regulator driver"
depends on I2C
help
Say Y here to support the voltage regulators and convertors
on National Semiconductors LP3972 PMIC

config REGULATOR_PCAP
tristate "PCAP2 regulator driver"
depends on EZX_PCAP
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/regulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
#


obj-$(CONFIG_REGULATOR) += core.o
obj-$(CONFIG_REGULATOR) += core.o dummy.o
obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o
obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o
obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o

obj-$(CONFIG_REGULATOR_AD5398) += ad5398.o
obj-$(CONFIG_REGULATOR_BQ24022) += bq24022.o
obj-$(CONFIG_REGULATOR_DUMMY) += dummy.o
obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o
obj-$(CONFIG_REGULATOR_LP3972) += lp3972.o
obj-$(CONFIG_REGULATOR_MAX1586) += max1586.o
obj-$(CONFIG_REGULATOR_TWL4030) += twl-regulator.o
obj-$(CONFIG_REGULATOR_MAX8649) += max8649.o
obj-$(CONFIG_REGULATOR_MAX8660) += max8660.o
obj-$(CONFIG_REGULATOR_MAX8925) += max8925-regulator.o
obj-$(CONFIG_REGULATOR_MAX8952) += max8952.o
obj-$(CONFIG_REGULATOR_MAX8998) += max8998.o
obj-$(CONFIG_REGULATOR_WM831X) += wm831x-dcdc.o
obj-$(CONFIG_REGULATOR_WM831X) += wm831x-isink.o
Expand Down
57 changes: 48 additions & 9 deletions trunk/drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ static DEFINE_MUTEX(regulator_list_mutex);
static LIST_HEAD(regulator_list);
static LIST_HEAD(regulator_map_list);
static int has_full_constraints;
static bool board_wants_dummy_regulator;

/*
* struct regulator_map
Expand Down Expand Up @@ -63,7 +64,8 @@ struct regulator {
};

static int _regulator_is_enabled(struct regulator_dev *rdev);
static int _regulator_disable(struct regulator_dev *rdev);
static int _regulator_disable(struct regulator_dev *rdev,
struct regulator_dev **supply_rdev_ptr);
static int _regulator_get_voltage(struct regulator_dev *rdev);
static int _regulator_get_current_limit(struct regulator_dev *rdev);
static unsigned int _regulator_get_mode(struct regulator_dev *rdev);
Expand Down Expand Up @@ -1108,6 +1110,11 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
}
}

if (board_wants_dummy_regulator) {
rdev = dummy_regulator_rdev;
goto found;
}

#ifdef CONFIG_REGULATOR_DUMMY
if (!devname)
devname = "deviceless";
Expand Down Expand Up @@ -1348,7 +1355,8 @@ int regulator_enable(struct regulator *regulator)
EXPORT_SYMBOL_GPL(regulator_enable);

/* locks held by regulator_disable() */
static int _regulator_disable(struct regulator_dev *rdev)
static int _regulator_disable(struct regulator_dev *rdev,
struct regulator_dev **supply_rdev_ptr)
{
int ret = 0;

Expand Down Expand Up @@ -1376,8 +1384,7 @@ static int _regulator_disable(struct regulator_dev *rdev)
}

/* decrease our supplies ref count and disable if required */
if (rdev->supply)
_regulator_disable(rdev->supply);
*supply_rdev_ptr = rdev->supply;

rdev->use_count = 0;
} else if (rdev->use_count > 1) {
Expand Down Expand Up @@ -1407,17 +1414,29 @@ static int _regulator_disable(struct regulator_dev *rdev)
int regulator_disable(struct regulator *regulator)
{
struct regulator_dev *rdev = regulator->rdev;
struct regulator_dev *supply_rdev = NULL;
int ret = 0;

mutex_lock(&rdev->mutex);
ret = _regulator_disable(rdev);
ret = _regulator_disable(rdev, &supply_rdev);
mutex_unlock(&rdev->mutex);

/* decrease our supplies ref count and disable if required */
while (supply_rdev != NULL) {
rdev = supply_rdev;

mutex_lock(&rdev->mutex);
_regulator_disable(rdev, &supply_rdev);
mutex_unlock(&rdev->mutex);
}

return ret;
}
EXPORT_SYMBOL_GPL(regulator_disable);

/* locks held by regulator_force_disable() */
static int _regulator_force_disable(struct regulator_dev *rdev)
static int _regulator_force_disable(struct regulator_dev *rdev,
struct regulator_dev **supply_rdev_ptr)
{
int ret = 0;

Expand All @@ -1436,8 +1455,7 @@ static int _regulator_force_disable(struct regulator_dev *rdev)
}

/* decrease our supplies ref count and disable if required */
if (rdev->supply)
_regulator_disable(rdev->supply);
*supply_rdev_ptr = rdev->supply;

rdev->use_count = 0;
return ret;
Expand All @@ -1454,12 +1472,17 @@ static int _regulator_force_disable(struct regulator_dev *rdev)
*/
int regulator_force_disable(struct regulator *regulator)
{
struct regulator_dev *supply_rdev = NULL;
int ret;

mutex_lock(&regulator->rdev->mutex);
regulator->uA_load = 0;
ret = _regulator_force_disable(regulator->rdev);
ret = _regulator_force_disable(regulator->rdev, &supply_rdev);
mutex_unlock(&regulator->rdev->mutex);

if (supply_rdev)
regulator_disable(get_device_regulator(rdev_get_dev(supply_rdev)));

return ret;
}
EXPORT_SYMBOL_GPL(regulator_force_disable);
Expand Down Expand Up @@ -2462,6 +2485,22 @@ void regulator_has_full_constraints(void)
}
EXPORT_SYMBOL_GPL(regulator_has_full_constraints);

/**
* regulator_use_dummy_regulator - Provide a dummy regulator when none is found
*
* Calling this function will cause the regulator API to provide a
* dummy regulator to consumers if no physical regulator is found,
* allowing most consumers to proceed as though a regulator were
* configured. This allows systems such as those with software
* controllable regulators for the CPU core only to be brought up more
* readily.
*/
void regulator_use_dummy_regulator(void)
{
board_wants_dummy_regulator = true;
}
EXPORT_SYMBOL_GPL(regulator_use_dummy_regulator);

/**
* rdev_get_drvdata - get rdev regulator driver data
* @rdev: regulator
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/regulator/dummy.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ struct regulator_dev;

extern struct regulator_dev *dummy_regulator_rdev;

#ifdef CONFIG_REGULATOR_DUMMY
void __init regulator_dummy_init(void);
#else
static inline void regulator_dummy_init(void) { }
#endif

#endif
Loading

0 comments on commit 11c85e4

Please sign in to comment.