06 Dec, 2011
3 commits
-
It's not always true that the device_node of regulator can be found
at dev->of_node at the time when of_get_regulator_init_data() is being
called, because in some cases the regulator nodes in device tree do
not have 'struct device' behind them until regulator_dev gets created
for it by core function regulator_register().The patch adds device_node as a new parameter to
of_get_regulator_init_data(), so that caller can pass in the node of
regulator directly.Signed-off-by: Shawn Guo
Cc: Mark Brown
Cc: Liam Girdwood
Signed-off-by: Mark Brown -
Otherwise there is no way in the bindings to configure a fixed voltage
via software. It seems reasonable to assume that if the binding explicitly
specifies a voltage we want to actually use that voltage.Signed-off-by: Mark Brown
-
The commit 2c043bcbf287 ("regulator: pass additional of_node to
regulator_register()") added an additional parameter to the
regulator_register() API.
Update the Documentation accordingly to reflect the change
in the function signature.Reported-by: Thomas Abraham
Signed-off-by: Rajendra Nayak
Signed-off-by: Mark Brown
29 Nov, 2011
1 commit
-
Device tree compiler does not recognize '-' in label name. Instead,
'_' works fine.Signed-off-by: Shawn Guo
Signed-off-by: Mark Brown
28 Nov, 2011
1 commit
-
of_get_fixed_voltage_config() may return NULL, return -ENOMEM in this case
so we don't dereference NULL pointer.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
27 Nov, 2011
3 commits
-
It is not used outside this driver so no need to make the symbol global.
Signed-off-by: Axel Lin
Signed-off-by: Mark Brown -
of_get_regulator_init_data() may return NULL, thus
check the return value to avoid NULL pointer dereference.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown -
of_get_regulator_init_data is called in drivers/regulator/fixed.c
which could be a module.Export of_get_regulator_init_data to fix below build error:
ERROR: "of_get_regulator_init_data" [drivers/regulator/fixed.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2Reported-by: Randy Dunlap
Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
24 Nov, 2011
5 commits
-
The commit 2c043bcbf287 ("regulator: pass additional of_node to
regulator_register()") caused a compile break because it missed
updating the regulator_register() call in gpio-regulator.c with
the additional parameter (NULL).The compile break as reported by Stephen Rothwell with the
x86_64 allmodconfig looked like thisdrivers/regulator/gpio-regulator.c: In function 'gpio_regulator_probe':
drivers/regulator/gpio-regulator.c:287:8: error: too few arguments to function 'regulator_register'
include/linux/regulator/driver.h:215:23: note: declared hereReported-by: Stephen Rothwell
Signed-off-by: Rajendra Nayak
Signed-off-by: Mark Brown -
Device nodes in DT can associate themselves with one or more
regulators/supply by providing a list of phandles (to regulator nodes)
and corresponding supply names.For Example:
devicenode: node@0x0 {
...
...
vmmc-supply = ;
vpll-supply = ;
};The driver would then do a regulator_get(dev, "vmmc"); to get
regulator1 and do a regulator_get(dev, "vpll"); to get
regulator2.of_get_regulator() extracts the regulator node for a given
device, based on the supply name.Use it to look up the regulator for a given consumer from device tree, during
a regulator_get(). If not found fallback and lookup through
the regulator_map_list instead.Also, since the regulator dt nodes can use the same binding to
associate with a parent regulator/supply, allow the drivers to
specify a supply_name, which can then be used to lookup dt
to find the parent phandle.Signed-off-by: Rajendra Nayak
Acked-by: Grant Likely
Signed-off-by: Mark Brown -
With device tree support for regulators, its needed that the
regulator_dev->dev device has the right of_node attached.
To be able to do this add an additional parameter to the
regulator_register() api, wherein the dt-adapted driver can
then pass this additional info onto the regulator core.Signed-off-by: Rajendra Nayak
Signed-off-by: Mark Brown -
The fixed regulator driver uses of_get_fixed_voltage_config()
to extract fixed_voltage_config structure contents from device tree.Also add documenation for additional bindings for fixed
regulators that can be passed through dt.Signed-off-by: Rajendra Nayak
Signed-off-by: Mark Brown -
The helper routine is meant to be used by the regulator drivers
to extract the regulator_init_data structure from the data
that is passed from device tree.
'consumer_supplies' which is part of regulator_init_data is not extracted
as the regulator consumer mappings are passed through DT differently,
implemented in subsequent patches.
Similarly the regulatorparent/supply mapping is handled in
subsequent patches.Also add documentation for regulator bindings to be used to pass
regulator_init_data struct information from device tree.Some of the regulator properties which are linux and board specific,
are left out since its not clear if they can
be in someway embedded into the kernel or passed in from DT.
They will be revisited later.Signed-off-by: Rajendra Nayak
Signed-off-by: Mark Brown
16 Nov, 2011
7 commits
-
* 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
iommu: omap: Fix compile failure -
* 'fixes' of git://git.linaro.org/people/triad/linux-pinctrl:
pinctrl: hide subsystem from the populace
pinctrl: fix "warning: 'struct pinctrl_dev' declared inside parameter list" -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
fsl-rio: fix compile error -
* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6:
gpio: pca953x: propagate the errno from the chip_init functions
gpio: pca953x: remove unneeded check for chip type
gpio/omap: check return value from irq_alloc_generic_chip
gpio/omap: replace MOD_REG_BIT macro with static inline -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin:
blackfin: Fixup export.h includes
Blackfin: add serial TX IRQ in individual platform resource -
On a corrupted file system the ->len field could be wrong leading to
a buffer overflow.Reported-and-acked-by: Clement LECIGNE
Signed-off-by: Dan Carpenter
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds
15 Nov, 2011
1 commit
-
The "#include " was replaced by "#include "
in the patch "powerpc: various straight conversions from module.h --> export.h".
This will cause the following compile problem:
arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
arch/powerpc/sysdev/fsl_rio.c:296: error: implicit declaration of function 'search_exception_tables'.The file fsl_rio.c needs the declaration of function "search_exception_tables"
in the header file "linux/module.h".Signed-off-by: Liu Gang
Signed-off-by: Paul Gortmaker
14 Nov, 2011
7 commits
-
Commit 8dc7a9c84 ("blackfin: Add export.h to files using
EXPORT_SYMBOL/THIS_MODULE") inserted some of the include statements into
sections protected by an unrelated #if CONFIG_... statement. This can cause,
depending on the configuration used, warnings like this one:arch/blackfin/mach-bf537/boards/stamp.c:2940: warning: data definition has no type or storage class
arch/blackfin/mach-bf537/boards/stamp.c:2940: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
arch/blackfin/mach-bf537/boards/stamp.c:2940: warning: parameter names (without types) in function declarationThis patch fixes it by moving the includes out of the #if protected sections.
Signed-off-by: Lars-Peter Clausen
Acked-by: Mike Frysinger
Signed-off-by: Bob Liu -
The serial TX IRQ is not simply (RX IRQ + 1) on some Blackfin chips,
so move the values to the platform resources.Signed-off-by: Sonic Zhang
Signed-off-by: Mike Frysinger
Signed-off-by: Bob Liu -
* 'rmobile-fixes-for-linus' of git://github.com/pmundt/linux-sh:
ARM: mach-shmobile: cpuidle single/global and last_state fixes
ARM: mach-shmobile: move helper macro PORTCR to sh_pfc.h
ARM: mach-shmobile: move helper macro PORT_xx to sh_pfc.h
ARM: mach-shmobile: move helper macro PORT_DATA_xx to sh_pfc.h
ARM: mach-shmobile: ap4evb: remove white space from end of line
ARM: mach-shmobile: clock-sh7372: remove un-necessary index
ARM: mach-shmobile: kota2: add comment out separator
ARM: mach-shmobile: sh73a0: add MMC data pin pull-up -
* 'sh-fixes-for-linus' of git://github.com/pmundt/linux-sh:
mailmap: Fix up some renesas attributions
sh: clkfwk: Kill off remaining debugfs cruft.
drivers: sh: Kill off dead pathname for runtime PM stub.
drivers: sh: Generalize runtime PM platform stub.
sh: Wire up process_vm syscalls.
sh: clkfwk: add clk_rate_mult_range_round()
serial: sh-sci: Fix up SH-2A SCIF support.
sh: Fix cached/uncaced address calculation in 29bit mode -
* git://github.com/rustyrussell/linux:
virtio-pci: fix use after free -
Commit 31a3ddda166cda86d2b5111e09ba4bda5239fae6 introduced
a use after free in virtio-pci. The main issue is
that the release method signals removal of the virtio device,
while remove signals removal of the pci device.For example, on driver removal or hot-unplug,
virtio_pci_release_dev is called before virtio_pci_remove.
We then might get a crash as virtio_pci_remove tries to use the
device freed by virtio_pci_release_dev.We allocate/free all resources together with the
pci device, so we can leave the release method empty.Signed-off-by: Michael S. Tsirkin
Acked-by: Amit Shah
Signed-off-by: Rusty Russell
Cc: stable@kernel.org -
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/radeon/kms/combios: fix dynamic allocation of PM clock modes
13 Nov, 2011
2 commits
-
After commit e978aa7d7d57 ("cpuidle: Move dev->last_residency update to
driver enter routine; remove dev->last_state") setting acpi_idle_suspend
to 1 by acpi_processor_suspend() causes the ACPI cpuidle routines to
return error codes continuously, which in turn causes cpuidle to lock up
(hard).However, acpi_idle_suspend doesn't appear to be useful for any
particular purpose (it's racy and doesn't really provide any real
protection), so it can be removed, which makes the problem go away.Reported-and-tested-by: Tomas M.
Reported-and-tested-by: Ferenc Wagner
Tested-by: Arnd Bergmann
Signed-off-by: Rafael J. Wysocki
Signed-off-by: Linus Torvalds -
I missed the combios path when I updated the atombios pm code.
Reported by amarsh04 on IRC.
Signed-off-by: Alex Deucher
Signed-off-by: Dave Airlie
12 Nov, 2011
10 commits
-
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
arm/imx: fix imx6q mmc error when mounting rootfs
arm/imx: fix AUTO_ZRELADDR selection
arm/imx: fix the references to ARCH_MX3
ARM: mx51/53: set pwm clock parent to ipg_perclk
arm/tegra: enable headphone detection gpio on seaboard
arm/dt: Fix ventana SDHCI power-gpios
arm/tegra: Don't create duplicate gpio and pinmux devices
ARM: at91: Fix USBA gadget registration
atmel/spi: fix missing probe
at91/yl-9200: Fix section mismatch
at91: vmalloc fix missing AT91_VIRT_BASE define
ARM: at91: usart: drop static map regs for dbgu
ARM: picoxcell: add extra temp register to addruart
ARM: msm: fix compilation flags for MSM_SCM
arm/mxs: fix mmc device adding for mach-mx28evk
ARM: mxc: Remove test_for_ltirq
ARM:i.MX: fix build error in clock-mx51-mx53.c
ARM:i.MX: fix build error in tzic/avic.c
ARM: mxc: fix local timer interrupt handling
msm: boards: Fix fallout from removal of machine_desc in fixup -
The variable i is removed by commit ded8433
"[CPUFREQ] db8500: remove unneeded for loop iteration over freq_table",
but current code to print available frequencies still uses the i variable.
Thus add the i variable back to fix below buld error:CC drivers/cpufreq/db8500-cpufreq.o
drivers/cpufreq/db8500-cpufreq.c: In function 'db8500_cpufreq_init':
drivers/cpufreq/db8500-cpufreq.c:123: error: 'i' undeclared (first use in this function)
drivers/cpufreq/db8500-cpufreq.c:123: error: (Each undeclared identifier is reported only once
drivers/cpufreq/db8500-cpufreq.c:123: error: for each function it appears in.)
make[2]: *** [drivers/cpufreq/db8500-cpufreq.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2This patch also fixes using uninitialized i variable as array index.
Signed-off-by: Axel Lin
Acked-by: Linus Walleij
Signed-off-by: Dave Jones -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (29 commits)
m68k/mac: Remove mac_irq_{en,dis}able() wrappers
m68k/irq: Remove obsolete support for user vector interrupt fixups
m68k/irq: Remove obsolete m68k irq framework
m68k/q40: Convert Q40/Q60 to genirq
m68k/sun3: Convert Sun3/3x to genirq
m68k/sun3: Use the kstat_irqs_cpu() wrapper
m68k/apollo: Convert Apollo to genirq
m68k/vme: Convert VME to genirq
m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
m68k/mac: Optimize interrupts using chain handlers
m68k/mac: Convert Mac to genirq
m68k/amiga: Optimize interrupts using chain handlers
m68k/amiga: Convert Amiga to genirq
m68k/amiga: Refactor amiints.c
m68k/atari: Remove code and comments about different irq types
m68k/atari: Convert Atari to genirq
m68k/irq: Add genirq support
m68k/irq: Remove obsolete IRQ_FLG_* users
m68k/irq: Rename {,__}m68k_handle_int()
m68k/irq: Add m68k_setup_irq_controller()
... -
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] v4l2-ctrl: Send change events to all fh for auto cluster slave controls
[media] v4l2-event: Don't set sev->fh to NULL on unsubscribe
[media] v4l2-event: Remove pending events from fh event queue when unsubscribing
[media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALL
[media] MAINTAINERS: add a maintainer for s5p-mfc driver
[media] v4l: s5p-mfc: fix reported capabilities
[media] media: vb2: reset queued list on REQBUFS(0) call
[media] media: vb2: set buffer length correctly for all buffer types
[media] media: vb2: add a check for uninitialized buffer
[media] mxl111sf: fix build warning
[media] mxl111sf: remove pointless if condition in mxl111sf_config_spi
[media] mxl111sf: check for errors after mxl111sf_write_reg in mxl111sf_idac_config
[media] mxl111sf: fix return value of mxl111sf_idac_config
[media] uvcvideo: GET_RES should only be checked for BITMAP type menu controls -
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/kvm: Fix build failure with HV KVM and CBE
powerpc/ps3: Fix lv1_gpu_attribute hcall
powerpc/ps3: Fix PS3 repository build warnings
powerpc/ps3: irq: Remove IRQF_DISABLED
powerpc/irq: Remove IRQF_DISABLED
powerpc/numa: NUMA topology support for PowerNV
powerpc: Add System RAM to /proc/iomem
powerpc: Add KVM as module to defconfigs
powerpc/kvm: Fix build with older toolchains
powerpc, tqm5200: update tqm5200_defconfig to fit for charon board.
powerpc/5200: add support for charon board -
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: Fix missing system calls check on mips. -
This needed the sfi IRQ 0xFF fix to go in first. It simply plumbs in the
bma023 driver with the firmware naming of it.Signed-off-by: William Douglas
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Real world year equals the value in vrtc YEAR register plus an offset.
We used 1960 as the offset to make leap year consistent, but for a
device's first use, its YEAR register is 0 and the system year will
be parsed as 1960 which is not a valid UNIX time and will cause many
applications to fail mysteriously. So we use 1972 instead to fix this
issue.Updated patch which adds a sanity check suggested by Mathias
This isn't a change in behaviour for systems, because 1972 is the one we
actually use. It's the old version in upstream which is out of sync with
all devices.Signed-off-by: Feng Tang
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
Fix a build error. CE4100 with no serial errors because the alternate
function is only a prototype not a null function as intended.Signed-off-by: Zhang Rui
Signed-off-by: Alan Cox
Signed-off-by: Linus Torvalds -
* 'upstream-linus' of git://github.com/jgarzik/libata-dev:
pata_of_platform: Don't use NO_IRQ
[libata] ahci: Add ASMedia ASM1061 support
[libata] Issue SRST to Sil3726 PMP
sata_sis.c: trivial spelling fix
ahci_platform: use dev_get_platdata()
[libata] libata-scsi.c: Add function parameter documentation