Andrew Chew [Tue, 19 Oct 2010 09:08:36 +0000 (11:08 +0200)]
mfd: Add TPS658621C device ID
The interface for this device should be identical to that of the
TPS658521A.
Signed-off-by: Andrew Chew <achew@nvidia.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
G, Manjunath Kondaiah [Tue, 19 Oct 2010 09:02:48 +0000 (11:02 +0200)]
mfd: Fix twl-irq function declaration warnings
Fixes following sparse warnings for twl4030 and twl6030 irq files.
drivers/mfd/twl4030-irq.c:783:5: warning: symbol 'twl4030_init_irq' was not
declared. Should it be static?
drivers/mfd/twl4030-irq.c:863:5: warning: symbol 'twl4030_exit_irq' was not
declared. Should it be static?
drivers/mfd/twl4030-irq.c:873:5: warning: symbol 'twl4030_init_chip_irq' was
not declared. Should it be static?
drivers/mfd/twl6030-irq.c:226:5: warning: symbol 'twl6030_init_irq' was not
declared. Should it be static?
drivers/mfd/twl6030-irq.c:290:5: warning: symbol 'twl6030_exit_irq' was not
declared. Should it be static?
Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Tony Lindgren <tony@atomide.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Lukasz Majewski [Mon, 27 Sep 2010 12:32:27 +0000 (14:32 +0200)]
regulator: max8998 BUCK1/2 voltage change with use of GPIOs
max8998_pmic_probe:
- modified to check if valid pins are defined at platform
data
- maximal voltage values (predefined at platform data) are uploaded to
max8998 device
max8998_set_voltage_buck:
- BUCK1/2 voltages change between values already defined
- Checks if valid GPIO pins are passed from platform data
- If requested voltage cannot be satisfied from already defined values,
then one of free slots is used
- Predefined maximum voltages (as defined at platform data) are always
available
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Lukasz Majewski [Mon, 27 Sep 2010 12:32:26 +0000 (14:32 +0200)]
mfd: Voltages and GPIOs platform_data definitions for max8998
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Lukasz Majewski [Mon, 27 Sep 2010 12:32:25 +0000 (14:32 +0200)]
regulator: max8998 BUCK1/2 internal voltages and indexes defined
BUCK1/2 internal voltages and indexes defined in the struct max8998_data
max_get_voltage_register now uses index values to chose proper register
More generic BUCK1/2 registers names provided
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Lukasz Majewski [Mon, 27 Sep 2010 12:32:24 +0000 (14:32 +0200)]
mfd: Support for ICs compliant with max8998
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Lukasz Majewski [Mon, 27 Sep 2010 12:32:23 +0000 (14:32 +0200)]
regulator: Separate set_voltage for max8998 ldo and buck
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Grazvydas Ignotas [Tue, 28 Sep 2010 13:22:19 +0000 (16:22 +0300)]
mfd: Fix TWL4030 COR bit polarity for BCI SIH block
The chip TRM documentation contradicts itself about this bit, page 174
of swcu050e says bit should be 0 for clear-on-read behavior, while
page 487 says it should be 1. Testing shows it should be 1, so set
the .set_cor flag accordingly. This is needed for upcoming BCI
charging driver to function.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Brian Harring [Mon, 18 Oct 2010 23:21:06 +0000 (01:21 +0200)]
mfd: Add devices platform data when the cell data size is not 0
When the cell data_size is 0, the resulting platform_data pointer will be
set to ZERO_SIZE_PTR. That could be misleading for device drivers running
a NULL check on thei platform_data pointer before dereferencing it.
Signed-off-by: Brian Harring <ferringb@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Grazvydas Ignotas [Fri, 1 Oct 2010 10:17:50 +0000 (13:17 +0300)]
mfd: Add twl4030_bci platform_data back
Now that we have twl4030 charger driver, add back it's platform_data
(which was removed by
f7ea2dc59ed46dcd0f1cfaccda02211f4507207b
as unused).
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Uwe Kleine-König [Thu, 28 Oct 2010 10:30:53 +0000 (12:30 +0200)]
rtc: Add support for the rtc found in the MC13892 PMIC
The mfd driver for MC13783 recently got support for MC13892 and was
renamed accordingly from mc13783-core to mc13xxx-core. Do the same for
rtc-mc13783.
The only relevant change is to use platform id's to tell the platform bus
that this driver is responsible for mc13892-rtc devices, too.
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
kishore kadiyala [Fri, 24 Sep 2010 17:13:20 +0000 (17:13 +0000)]
mfd: Adding twl6030 mmc card detect support for MMC1
Adding card detect callback function and card detect configuration
function for MMC1 Controller on OMAP4.
Card detect configuration function does initial configuration of the
MMC Control & PullUp-PullDown registers of Phoenix.
For MMC1 Controller, card detect interrupt source is
twl6030 which is non-gpio. The card detect call back function provides
card present/absent status by reading MMC Control register present
on twl6030.
Since OMAP4 doesn't use any GPIO line as used in OMAP3 for card detect,
the suspend/resume initialization which was done in omap_hsmmc_gpio_init
previously is moved to the probe thus making it generic for both OMAP3 &
OMAP4.
Cc: Tony Lindgren <tony@atomide.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Uwe Kleine-König [Tue, 28 Sep 2010 14:37:20 +0000 (16:37 +0200)]
mfd: Add mc13892 support to mc13xxx
mc13892 is the companion PMIC for Freescale's i.MX51. It's similar enough
to mc13782 to support it in a single driver.
This patch introduces enough compatibility cruft to keep all users of the
superseded mc13783 driver unchanged.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Uwe Kleine-König [Tue, 28 Sep 2010 14:38:41 +0000 (16:38 +0200)]
mfd: Remove deprecated mc13783 functions
The last user is gone since v2.6.34-rc1~40
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Uwe Kleine-König [Tue, 28 Sep 2010 12:50:18 +0000 (14:50 +0200)]
mfd: Remove obsolete mc13783 private data
The regulator driver was converted to get the needed data directly from
platform_data by
a10099b (regulator/mc13783: various cleanups)
so regulators and num_regulators can go away. Then apart from the flag
indicating that the adc does a conversion, flags is only a copy of the
flags member of platform_data. This flag isn't needed to be returned by
mc13783_get_flags, so mc13783_get_flags now gets the flags from
platform_data, too and the driver private member is renamed for clearity.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Daniel Drake [Thu, 30 Sep 2010 20:55:48 +0000 (21:55 +0100)]
gpio: Add VIA VX855 GPIO driver
This is needed for supporting the upcoming VX855 camera and OLPC DCON
drivers, as well as the advanced viafb features on non-OLPC hardware
based on this chip.
Based on earlier work by Harald Welte.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Daniel Drake [Thu, 30 Sep 2010 20:55:41 +0000 (21:55 +0100)]
mfd: Add VIA VX855 multi-function device support
This device has GPIO, SPI and I2C capabilities.
The hardware can be found in the OLPC XO-1.5 laptop.
Based on earlier work by Harald Welte.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Daniel Drake [Thu, 30 Sep 2010 20:55:36 +0000 (21:55 +0100)]
mfd: Allow for bypass of cell resource conflict check
The upcoming VIA VX855 MFD driver needs to communicate resources
to subdevices where the resources may be claimed by ACPI.
Add a flag to mfd_cell to request that resources are not policed.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Haojian Zhuang [Wed, 8 Sep 2010 13:44:35 +0000 (09:44 -0400)]
input: Monitor both onkey up and down event
Remove original 3-second ONKEY event. Detect ONKEY changing event directly.
So both UP and DOWN event of ONKEY in max8925 are monitered.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Haojian Zhuang [Wed, 8 Sep 2010 13:44:33 +0000 (09:44 -0400)]
leds: Remove auto blink in 88pm860x
88pm860x supports auto-blink LED in hardware. It messed with
timer trigger. Now disable the auto-blink function.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Mark Brown [Tue, 28 Sep 2010 16:13:39 +0000 (09:13 -0700)]
mfd: Add WM8325 support
The WM8325 is a PMIC for low power, high performance applications. From
a software point of view the device is identical to the WM8320, all the
differences are at the hardware level.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Mark Brown [Wed, 22 Sep 2010 13:58:30 +0000 (14:58 +0100)]
mfd: Declare abx500_remove_ops()
Otherwise sparse warns about a public symbol with no declaration and
the compiler can't spot if the callers and users have different signatures
for the function.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
G, Manjunath Kondaiah [Tue, 21 Sep 2010 10:01:17 +0000 (15:31 +0530)]
mfd: Fix twl-core sparse warning
Fixes below sparse warning.
drivers/mfd/twl-core.c:258:20: warning: symbol 'twl_map' was not declared. Should it be static?
Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Tony Lindgren <tony@atomide.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Richard Röjfors [Wed, 15 Sep 2010 14:49:24 +0000 (16:49 +0200)]
mfd: Use DMA for timberdale's ks8842
This patch defines platform data for the ks8842 int the timberdale
MFD.
The platform data contains DMA channels to be used by the driver.
Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Sundar Iyer [Wed, 15 Sep 2010 05:00:54 +0000 (10:30 +0530)]
mfd: Add PM support to STMPE devices
Add PM helpers to STMPE and add support to enable wakeup from low power
states
Acked-by: Rabin VINCENT <rabin.vincent@stericsson.com>
Acked-by: Linus WALLEIJ <linus.walleij@stericsson.com>
Signed-off-by: Sundar Iyer <sundar.iyer@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Vasiliy Kulikov [Sun, 12 Sep 2010 18:57:19 +0000 (22:57 +0400)]
gpio: Fix stmpe error path
Free allocated memory. Call stmpe_disable() if it was enabled.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Samuel Ortiz [Sun, 19 Sep 2010 22:19:27 +0000 (00:19 +0200)]
mfd: msp430 expects I2C to be built-in
msp430 being a bool, it will only work with I2C=y
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Arun Murthy [Wed, 15 Sep 2010 11:37:18 +0000 (13:37 +0200)]
mfd: Update kconfig for ab8500 core driver
This patch add a dependancy for ab8500-core driver so as to depend on
u8500 platform.
This patch also fixes the build issues(powerpc_allyesconfig) for the
patch
03f582a93ecca6e9584b622570022abf08ed03ec (misc: Add ab8500 pwm
driver)
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Gary King [Sun, 19 Sep 2010 22:18:27 +0000 (00:18 +0200)]
mfd: Add basic tps6586x interrupt support
Add support for enabling and disabling tps6586x subdevice interrupts
Signed-off-by: Gary King <gking@nvidia.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Mattias Wallin [Wed, 15 Sep 2010 11:12:03 +0000 (13:12 +0200)]
mfd: AB8500 register access via PRCMU I2C
This patch adds the choice of accessing the AB8500 registers
via prcmu I2C. Access either via SPI or I2C is supported.
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Mattias Wallin [Mon, 13 Sep 2010 14:05:04 +0000 (16:05 +0200)]
mfd: AB8500 debugfs
This patch adds the possibility to read and write registers
via the debug_fs. It also adds ranges of registers sorted by bank
which makes it possible to read all defined registers in a bank.
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Haojian Zhuang [Wed, 8 Sep 2010 13:44:34 +0000 (09:44 -0400)]
mfd: Update chip id of 88pm8607
Chipid of 88pm8607 is 0x40 or 0x50.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Arun Murthy [Mon, 6 Sep 2010 06:54:52 +0000 (12:24 +0530)]
misc: Add ab8500 pwm driver
This patch adds a Pulse Width Modulation driver for Analog Baseband
Chip AB8500.
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Mattias Wallin [Fri, 10 Sep 2010 15:47:56 +0000 (17:47 +0200)]
mfd: Align ab8500 with the abx500 interface
This patch makes the ab8500 mixed signal chip expose the same
interface for register access as the ab3100, ab3550 and ab5500 chip.
The ab8500_read() and ab8500_write() is removed and replaced with
abx500_get_register_interruptible() and
abx500_set_register_interruptible().
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Virupax Sadashivpetimath [Tue, 31 Aug 2010 04:34:56 +0000 (10:04 +0530)]
gpio: Handle stmpe-gpio platform data with no gpio base
This patch removes the requirement that gpio base be supplied in
platform data.
Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Yusuke Goda [Mon, 30 Aug 2010 10:50:19 +0000 (11:50 +0100)]
mmc: Allow 2 byte requests in 4-bit mode for tmio_mmc
Adjust the tmio_mmc block size check to accept 2-byte requests in 4-bit
mode if the hardware supports it.
Tested with the SDHI hardware block included in sh7724.
Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Acked-by: Magnus Damm <damm@opensource.se>
Tested-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Arnd Hannemann [Fri, 10 Sep 2010 16:54:20 +0000 (18:54 +0200)]
ARM: mach-shmobile: ap4evb: Fix hotplug for SDHI1
On AP4EVB the card detect pin of the top SD/MMC slot is not directly
connected to the tmio/mmcif controller but to a GPIO pin, so polling
needs to be done for SDHI1 and MMCIF in order to support hotplug for
that slot. SHDI1 and MMCIF share that slot, and the used controller
is selected by a DIP switch.
This patch adds a helper function to check if a card is present in that
particular slot, registers this function with SDHI1 and MMCIF and enables
polling for SDHI1.
Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Arnd Hannemann [Tue, 24 Aug 2010 15:27:01 +0000 (17:27 +0200)]
mmc: Allow the platform to specify the sh_mmcif get_cd handler
In some platforms (e.g. AP4EVB) the card detect pin of a slot is not
directly connected to the sh_mmcif controller, so that polling needs
to be used. To overcome the overhead induced by querying the controller
on each poll cycle, card detection can be handled in the platform code
more efficiently.
This patch exposes a get_cd hook for that purpose.
Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Arnd Hannemann [Tue, 24 Aug 2010 15:27:00 +0000 (17:27 +0200)]
mfd: Allow the platform to specify the sh_mobile_sdhi get_cd handler
On some platforms (e.g. AP4EVB) the card detect pin of a slot is not
directly connected to the sdhi hardware, so that polling needs to be used
with tmio_mmc and card detection is handled in the platform code.
This patch allows to set tmio_mmc capabilities (to pass the
MMC_CAP_NEEDS_POLL flag) and exposes a get_cd hook for that purpose.
Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Arnd Hannemann [Tue, 24 Aug 2010 15:26:59 +0000 (17:26 +0200)]
mmc: Allow the tmio_mmc mfd driver to specify get_cd handler
Some controllers, supported by the tmio_mmc driver do not have the card
detect pin of a slot connected, so that polling needs to be used and
card detection is handled by other means.
This patch exposes a get_cd hook for that purpose.
Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Joonyoung Shim [Fri, 6 Aug 2010 02:28:08 +0000 (11:28 +0900)]
rtc: Add MAX8998 rtc driver
This adds support for the RTC provided by the Maxim 8998 chip. This
driver was tested on a GONI board by using the rtc-test application from
the Documentation/rtc.txt.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Joonyoung Shim [Fri, 10 Sep 2010 16:36:39 +0000 (18:36 +0200)]
mfd: Add MAX8998 interrupts support
Use genirq and provide seperated file for interrupts support.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Joonyoung Shim [Fri, 6 Aug 2010 02:28:06 +0000 (11:28 +0900)]
mfd: Use i2c_client as an argument on MAX8998 i2c routines
The MAX8998 chip have regulator and rtc features. The i2c slave address
of regulator and rtc is different, so needs each i2c client on i2c
operation functions.
Also, this patch exports i2c operation functions instead of callback to
make easy to read.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Axel Lin [Wed, 25 Aug 2010 03:20:25 +0000 (11:20 +0800)]
mfd: Remove redundant code to get htc_pasic3 irq
There is no reason to get irq twice.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Axel Lin [Tue, 24 Aug 2010 05:47:22 +0000 (13:47 +0800)]
mfd: Fix tps6586x_add_subdevs error path
1. return -ENOMEM if platform_device_alloc() fail.
2. call platform_device_put() if platform_device_add() fail.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Axel Lin [Tue, 24 Aug 2010 05:45:49 +0000 (13:45 +0800)]
mfd: Fix pcap_add_subdev error path
1. return -ENOMEM if platform_device_alloc() fail.
2. call platform_device_put() if platform_device_add() fail.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Axel Lin [Tue, 24 Aug 2010 05:44:05 +0000 (13:44 +0800)]
mfd: Fix da903x_add_subdevs error path
This patch fixes da903x_add_subdevs error path:
1. return -ENOMEM if platform_device_alloc() fail.
2. call platform_device_put() if platform_device_add() fail.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Haojian Zhuang [Thu, 12 Aug 2010 03:59:33 +0000 (11:59 +0800)]
mfd: Add codec resource into 88pm860x driver
Add codec IRQ resources that are used in 88pm860x codec driver.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Axel Lin [Tue, 24 Aug 2010 07:18:58 +0000 (15:18 +0800)]
mfd: Free tps6586x allocated resources when unload the module
For the resources allocated in tps6586x_i2c_probe(),
we need to free it in tps6586x_i2c_remove().
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Felipe Balbi [Wed, 18 Aug 2010 06:19:37 +0000 (09:19 +0300)]
usb: otg: twl4030-usb: switch over to defines in twl.h
use the new definitions on twl header for code
consistency.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Felipe Balbi [Wed, 18 Aug 2010 06:19:36 +0000 (09:19 +0300)]
mfd: Switch twl4030-power over to defines in twl.h
use the new definitions on twl header for code
consistency.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Felipe Balbi [Wed, 18 Aug 2010 06:19:35 +0000 (09:19 +0300)]
mfd: Switch twl-core over to defines in twl.h
use the new definitions on twl header for code
consistency.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Felipe Balbi [Fri, 10 Sep 2010 15:10:21 +0000 (17:10 +0200)]
i2c: twl: add register defines for pm master module
Some modules already need to talk to at least PROTECT_KEY
register, while at that, add defines to the entire register
space.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Kyungmin Park [Mon, 23 Aug 2010 04:46:49 +0000 (13:46 +0900)]
mfd: LP3974 PMIC support
LP3974 PMIC support. It has same functionality as max8998.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Wolfram Sang [Mon, 16 Aug 2010 15:14:44 +0000 (17:14 +0200)]
gpio: Add bitmask to block requests to unavailable stmpe GPIOs
GPIOs on these controller are multi-functional. If you decided to use
some of them e.g. as input channels for the ADC, you surely don't want
those pins to be reassigned as simple GPIOs (which may be triggered even
from userspace via 'export'). Same for the touchscreen controller pins.
Since knowledge about the hardware is needed to decide which GPIOs to
reserve, let this bitmask be inside platform_data and provide some
defines to assist potential users.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Linus Walleij [Fri, 20 Aug 2010 08:27:12 +0000 (10:27 +0200)]
mfd: Switch AB3100 to use MFD cells
This switches the AB3100 core driver to using MFD cells for
subdevices instead of spawning common platform devices.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Linus Walleij [Fri, 20 Aug 2010 08:26:56 +0000 (10:26 +0200)]
mfd: Move AB3100 to __devinit
Since there is no discardable probe() function in the I2C device
framework, let's just tag it __devinit and take the footprint hit
rather than seeing the compilation warnings every day.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Mark Brown [Tue, 17 Aug 2010 12:13:37 +0000 (13:13 +0100)]
gpiolib: Hook up WM8994 gpio_to_irq()
Not sure where this went.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Mark Brown [Tue, 17 Aug 2010 12:13:36 +0000 (13:13 +0100)]
mfd: Move PCF50633 IRQ protoypes where the definitions can see them
Fixed warnings about unprototyped global functions.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Linus Torvalds [Thu, 28 Oct 2010 22:13:55 +0000 (15:13 -0700)]
Merge branch 'kbuild' of git://git./linux/kernel/git/mmarek/kbuild-2.6
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
initramfs: Fix build break on symbol-prefixed archs
initramfs: fix initramfs size calculation
initramfs: generalize initramfs_data.xxx.S variants
scripts/kallsyms: Enable error messages while hush up unnecessary warnings
scripts/setlocalversion: update comment
kbuild: Use a single clean rule for kernel and external modules
kbuild: Do not run make clean in $(srctree)
scripts/mod/modpost.c: fix commentary accordingly to last changes
kbuild: Really don't clean bounds.h and asm-offsets.h
Linus Torvalds [Thu, 28 Oct 2010 22:13:24 +0000 (15:13 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
regulator: max8952 - fix max8952_set_voltage
regulator: max8952 - fix max8952_pmic_probe error path
regulator: fix build when CONFIG_REGULATOR_DUMMY=n
regulator: avoid deadlock when disabling regulator with supply
regulator: Add option for machine drivers to enable the dummy regulator
Regulator: lp3972 cleanup
Regulator: LP3972 PMIC regulator driver
MAX8952 PMIC Driver Initial Release
Linus Torvalds [Thu, 28 Oct 2010 22:13:05 +0000 (15:13 -0700)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
nfs4: The difference of 2 pointers is ptrdiff_t
nfs: testing the wrong variable
nfs: handle lock context allocation failures in nfs_create_request
Fixed Regression in NFS Direct I/O path
Axel Lin [Mon, 25 Oct 2010 23:55:54 +0000 (07:55 +0800)]
regulator: max8952 - fix max8952_set_voltage
In current implementation, vid is declared as u8,
then "vid == -1" is always false, and "vid >= 0" is always true.
Thus change it to s8.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Axel Lin [Mon, 25 Oct 2010 02:11:07 +0000 (10:11 +0800)]
regulator: max8952 - fix max8952_pmic_probe error path
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Anand Gadiyar [Mon, 11 Oct 2010 16:35:55 +0000 (22:05 +0530)]
regulator: fix build when CONFIG_REGULATOR_DUMMY=n
Commit
f03f91826 (regulator: Add option for machine drivers
to enable the dummy regulator) in the regulators tree
seems to have introduced the following build break when
CONFIG_REGULATOR_DUMMY is disabled. Fix this.
CC drivers/regulator/dummy.o
drivers/regulator/dummy.c:41: error: redefinition of 'regulator_dummy_init'
drivers/regulator/dummy.h:28: note: previous definition of 'regulator_dummy_init' was here
make[2]: *** [drivers/regulator/dummy.o] Error 1
make[1]: *** [drivers/regulator] Error 2
make: *** [drivers] Error 2
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Jeffrey Carlyle [Fri, 8 Oct 2010 19:49:19 +0000 (14:49 -0500)]
regulator: avoid deadlock when disabling regulator with supply
I have a regulator A that sets regulator B as its supply. When I call
set_supply to add B as the supply for A, regulator A gets added to the
supply_list for regulator B.
When I call regulator_disable(A), I end up with a call chain like this:
regulator_disable(A)
> mutex_lock(A)
> _regulator_disable(A)
>> _regulator_disable(B)
>>> _notifier_call_chain(B)
>>>> mutex_lock(A)
Which results in dead lock since we are trying to acquire the mutex lock
for regulator A which we already hold.
This patch addresses this issue by moving the call to disable regulator
B outside of the lock aquired inside the initial call to
regulator_disable.
This change also addresses the issue of not acquiring the mutex for
regulator B before calling _regulator_disable(B).
Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Wed, 6 Oct 2010 02:18:32 +0000 (19:18 -0700)]
regulator: Add option for machine drivers to enable the dummy regulator
Allow machine drivers to explicitly enable the use of the dummy regulator,
enabling simpler support for systems with only a few specific supplies
visible to software.
It is strongly recommended that this is not used on systems with
substantial software control over their PMICs, for maximum functionality
constrints should be as fully specified as possible.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Axel Lin [Sat, 18 Sep 2010 05:13:28 +0000 (13:13 +0800)]
Regulator: lp3972 cleanup
This patch includes below fixes based on Mark's comment.
- Return actual error if i2c_smbus_read_byte_data() fail
- Add spaces around bitwise AND operator(&) to improve readability
- Add comment to explain why we need to update voltage change control register
for LDO1 and LDO5
- Logging the value for diagnostics if chip reported incorrect voltage value
- Add __devinit annotation for setup_regulators()
- Show system control register1 value if the value is mismatched
- Logging the value for diagnostics if failed to detect device
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Axel Lin [Thu, 16 Sep 2010 08:48:49 +0000 (16:48 +0800)]
Regulator: LP3972 PMIC regulator driver
This patch adds regulator drivers for National Semiconductors LP3972 PMIC.
This LP3972 PMIC controller has 3 DC/DC voltage converters and 5 low drop-out
(LDO) regulators. LP3972 PMIC controller uses I2C interface.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
MyungJoo Ham [Fri, 20 Aug 2010 05:43:56 +0000 (14:43 +0900)]
MAX8952 PMIC Driver Initial Release
MAX8952 PMIC is used to provide voltage output between 770mV - 1400mV
with DVS support. In this initial release, users can set voltages for
four DVS modes, RAMP delay values, and SYNC frequency.
Controlling FPWM/SYNC_MODE/Pull-Down/Ramp Modes and reading CHIP_ID
is not supported in this release.
If GPIO of EN is not valid in platform data, the driver assumes that it
is always-on. If GPIO of VID0 or VID1 is invalid, the driver pulls down
VID0 and VID1 to fix DVS mode as 0 and disables DVS support.
We assume that V_OUT is capable to provide every voltage from 770mV to
1.40V in 10mV steps although the data sheet has some ambiguity on it.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
--
v2:
- Style correction
- Can accept platform_data with invalid GPIOs
- Removed unnecessary features
- Improved error handling
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mike Frysinger [Tue, 19 Oct 2010 20:11:53 +0000 (16:11 -0400)]
initramfs: Fix build break on symbol-prefixed archs
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Geert Uytterhoeven [Thu, 28 Oct 2010 18:06:19 +0000 (20:06 +0200)]
nfs4: The difference of 2 pointers is ptrdiff_t
On m68k, which is 32-bit:
fs/nfs/nfs4proc.c: In function ‘nfs41_sequence_done’:
fs/nfs/nfs4proc.c:432: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘int’
fs/nfs/nfs4proc.c: In function ‘nfs4_setup_sequence’:
fs/nfs/nfs4proc.c:576: warning: format ‘%ld’ expects type ‘long int’, but argument 5 has type ‘int’
On 32-bit, ptrdiff_t is int; on 64-bit, ptrdiff_t is long.
Introduced by commit
dfb4f309830359352539919f23accc59a20a3758 ("NFSv4.1: keep
seq_res.sr_slot as pointer rather than an index")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Linus Torvalds [Thu, 28 Oct 2010 19:25:42 +0000 (12:25 -0700)]
Merge branch 'x86-platform-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Move olpc to platform
x86: Move uv to platform
x86: Move mrst to platform
x86: Move scx200 to platform
x86: Move visws to platform
x86: Move efi to platform
x86: Move sfi to platform
x86: Add platform directory
Linus Torvalds [Thu, 28 Oct 2010 19:17:00 +0000 (12:17 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: (68 commits)
hwmon: (it87) Add support for the IT8721F/IT8758E
hwmon: (it87) Move conversion functions
hwmon: Remove many EXPERIMENTAL flags
hwmon: (lm85) Add support for ADT7468 high-frequency PWM mode
hwmon: (lm85) Document the ADT7468 as supported
hwmon: (lm85) Fix ADT7468 frequency table
hwmon: I2C addresses are constant
Move ams driver to macintosh
hwmon: (pcf8591) Don't attempt to detect devices
hwmon: (pcf8591) Register as a hwmon device
hwmon: (w83795) Use standard attributes for chassis intrusion
hwmon: (w83795) Exclude fan control feature by default
hwmon: (w83795) Add myself as co-author and maintainer
hwmon: (w83795) More style cleanups
hwmon: (w83795) Fix LSB reading of voltage limits
hwmon: (w83795) Use dev_get_drvdata() where possible
hwmon: (w83795) Delay reading pwm config registers
hwmon: (w83795) Delay reading limit registers
hwmon: (w83795) Move register reads to dedicated functions
hwmon: (w83795) Pack similar register reads
...
Linus Torvalds [Thu, 28 Oct 2010 19:13:00 +0000 (12:13 -0700)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (841 commits)
Staging: brcm80211: fix usage of roundup in structures
Staging: bcm: fix up network device reference counting
Staging: keucr: fix up US_ macro change
staging: brcm80211: brcmfmac: Removed codeversion from firmware filenames.
staging: brcm80211: Remove unnecessary header files.
staging: brcm80211: Remove unnecessary includes from bcmutils.c
staging: brcm80211: Removed unnecessary pktsetprio() function.
Staging: brcm80211: remove typedefs.h
Staging: brcm80211: remove uintptr typedef usage
Staging: hv: remove struct vmbus_channel_interface
Staging: hv: remove Open from struct vmbus_channel_interface
Staging: hv: storvsc: call vmbus_open directly
Staging: hv: netvsc: call vmbus_open directly
Staging: hv: channel: export vmbus_open to modules
Staging: hv: remove Close from struct vmbus_channel_interface
Staging: hv: netvsc: call vmbus_close directly
Staging: hv: storvsc: call vmbus_close directly
Staging: hv: channel: export vmbus_close to modules
Staging: hv: remove SendPacket from struct vmbus_channel_interface
Staging: hv: storvsc: call vmbus_sendpacket directly
...
Fix up conflicts in
drivers/staging/cx25821/cx25821-audio-upstream.c
drivers/staging/cx25821/cx25821-audio.h
due to warring whitespace cleanups (neither of which were all that great)
Linus Torvalds [Thu, 28 Oct 2010 19:06:51 +0000 (12:06 -0700)]
Merge git://git./linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (32 commits)
sh: intc: switch irq_desc iteration to new active IRQ iterator.
sh: fix up cpu hotplug IRQ migration for irq_data changes.
sh: oprofile: Make sure the backtrace op is available for timer-fallback.
sh64: oprofile: Fix up kernel stack pointer size mismatch.
sh: oprofile: Fix up and extend op_name_from_perf_id().
sh: lockless get_user_pages_fast()
sh64: _PAGE_SPECIAL support.
sound: sh: ctrl_in/outX to __raw_read/writeX conversion.
sh: disable deprecated genirq support.
sh: update show_interrupts() for irq_data chip lookup.
sh: intc: irq_data conversion.
sh64: irq_data conversion.
sh64: update for IRQ flag handling naming changes.
rtc: rtc-rs5c313: ctrl_in/outX to __raw_read/writeX conversion.
sh: mach-se: irq_data conversion.
input: hp680_ts_input: ctrl_in/outX to __raw_read/writeX conversion.
input: jornada680_kbd: ctrl_in/outX to __raw_read/writeX conversion.
sh: hd64461: irq_data conversion.
sh: mach-x3proto: irq_data conversion.
sh: mach-systemh: irq_data conversion.
...
Linus Torvalds [Thu, 28 Oct 2010 18:59:52 +0000 (11:59 -0700)]
Merge branch 'linux-next' of git://git./linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (27 commits)
x86: allocate space within a region top-down
x86: update iomem_resource end based on CPU physical address capabilities
x86/PCI: allocate space from the end of a region, not the beginning
PCI: allocate bus resources from the top down
resources: support allocating space within a region from the top down
resources: handle overflow when aligning start of available area
resources: ensure callback doesn't allocate outside available space
resources: factor out resource_clip() to simplify find_resource()
resources: add a default alignf to simplify find_resource()
x86/PCI: MMCONFIG: fix region end calculation
PCI: Add support for polling PME state on suspended legacy PCI devices
PCI: Export some PCI PM functionality
PCI: fix message typo
PCI: log vendor/device ID always
PCI: update Intel chipset names and defines
PCI: use new ccflags variable in Makefile
PCI: add PCI_MSIX_TABLE/PBA defines
PCI: add PCI vendor id for STmicroelectronics
x86/PCI: irq and pci_ids patch for Intel Patsburg DeviceIDs
PCI: OLPC: Only enable PCI configuration type override on XO-1
...
Jean Delvare [Thu, 28 Oct 2010 18:31:51 +0000 (20:31 +0200)]
hwmon: (it87) Add support for the IT8721F/IT8758E
Add support for the IT8721F/IT8758E. These new chips differ from the
older IT87xxF chips in the following ways:
* ADC LSB is 12 mV instead of 16 mV.
* PWM values are 8-bit instead of 7-bit.
There are other minor changes we don't have to care about in the
driver.
Another change is that we will handle internal voltage scaling in the
driver instead of delegating the work to user-space.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Thu, 28 Oct 2010 18:31:51 +0000 (20:31 +0200)]
hwmon: (it87) Move conversion functions
Move conversion functions until after structure defintions. This is
needed for future changes which make use of the structures in the
conversion funtcions.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
hwmon: Remove many EXPERIMENTAL flags
Remove the dependency on EXPERIMENTAL for all drivers which are in
the kernel tree for a long time, are known to work properly and for
which we have documentation.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Corentin Labbe <corentin.labbe@geomatys.fr>
Cc: Riku Voipio <riku.voipio@iki.fi>
Cc: Juerg Haefliger <juergh@gmail.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
hwmon: (lm85) Add support for ADT7468 high-frequency PWM mode
The ADT7468 supports a high-frequency PWM output mode where all PWM
outputs are driven by a 22.5 kHz clock. Add support for this mode, and
document it, as it may surprise the user that setting one PWM output
frequency also affects the other PWM outputs.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
hwmon: (lm85) Document the ADT7468 as supported
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
hwmon: (lm85) Fix ADT7468 frequency table
The ADT7468 uses the same frequency table as the ADT7463.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org
Cc: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
hwmon: I2C addresses are constant
We can mark normal_i2c const. Almost all drivers do that already, so
fix the 3 remaining ones before they are used as (bad) examples for
new drivers.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: George Joseph <george.joseph@fairview5.com>
Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
Move ams driver to macintosh
The ams driver isn't a hardware monitoring driver, so it shouldn't
live under driver/hwmon. drivers/macintosh seems much more
appropriate, as the driver is only useful on PowerBooks and iBooks.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Stelian Pop <stelian@popies.net>
Cc: Michael Hanselmann <linux-kernel@hansmi.ch>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Jean Delvare [Thu, 28 Oct 2010 18:31:50 +0000 (20:31 +0200)]
hwmon: (pcf8591) Don't attempt to detect devices
The PCF8591 can't be detected, don't even try. There are plenty of
other means to instantiate i2c devices these days.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (pcf8591) Register as a hwmon device
Register PCF8591 devices as hwmon devices. There's little point in
implementing the standard sysfs interface if we don't register it in
a way libsensors will pick it.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (w83795) Use standard attributes for chassis intrusion
Follow the standard attribute naming for the chassis intrusion
feature. I couldn't test the beeping (my board apparently doesn't do
that) but the alarm works fine.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (w83795) Exclude fan control feature by default
The fan control feature of the w83795 driver is insufficiently
reviewed and tested for public consumption at this time, so make it
optional and disabled by default. We will change the default when
review and testing is deemed sufficient. Ultimately the option will
go away.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (w83795) Add myself as co-author and maintainer
I've made so many changes to the w83795 driver that it's only fair to
list myself as a co-author. I'll also maintain the driver for some
time. There's more work needed on the driver for sure.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (w83795) More style cleanups
Cleanups suggested by Guenter Roeck, falling into 4 categories:
* Swapping test orders, because if (var == CONSTANT) is much easier to
read than if (CONSTANT == var).
* Simplifying comparisons with 0.
* Dropping unneeded masks.
* Dropping unneeded parentheses and curly braces.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (w83795) Fix LSB reading of voltage limits
Wrong index caused the wrong register value to be read, resulting in
random LSB for voltage limits.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Thu, 28 Oct 2010 18:31:49 +0000 (20:31 +0200)]
hwmon: (w83795) Use dev_get_drvdata() where possible
When we don't need the client pointer, calling dev_get_drvdata() is
more efficient that calling to_i2c_client() and then
i2c_get_clientdata().
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Thu, 28 Oct 2010 18:31:48 +0000 (20:31 +0200)]
hwmon: (w83795) Delay reading pwm config registers
Wait until we need the pwm config register values, instead of
pre-reading them. This saves over 1 second on modprobe on my test
system.
Obviously this time is added when first accessing pwm config
attributes, however not everybody will use them, so it seems unfair
to slow down driver loading (and thus boot) for an optional feature.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Thu, 28 Oct 2010 18:31:48 +0000 (20:31 +0200)]
hwmon: (w83795) Delay reading limit registers
Wait until we need the limit register values, instead of pre-reading
them. This saves 544 ms on modprobe on my test system. Obviously this
time is added when first running "sensors" or any other monitoring
application, but I think it is better than slowing down the boot.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Thu, 28 Oct 2010 18:31:48 +0000 (20:31 +0200)]
hwmon: (w83795) Move register reads to dedicated functions
Move initial register reads out of probe, to dedicated functions.
This makes the code clearer, and will be needed if we want to delay
calling these functions until they are needed, or want to call them
periodically.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:48 +0000 (20:31 +0200)]
hwmon: (w83795) Pack similar register reads
Pack similar register reads using for loops.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Thu, 28 Oct 2010 18:31:48 +0000 (20:31 +0200)]
hwmon: (w83795) Make W83795_REG_PWM more efficient
Cascaded conditionals are inefficient. Reorder the fields so that
PWM register addresses can be computed more efficiently.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Thu, 28 Oct 2010 18:31:48 +0000 (20:31 +0200)]
hwmon: (w83795) Don't pre-read values we'll update later
There is no point in reading registers during initialization if we
will refresh the values in the update function later. This is only
slowing down the driver loading with no benefit, stop doing it.
This change saves 480 ms on driver load on my test system.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Thu, 28 Oct 2010 18:31:48 +0000 (20:31 +0200)]
hwmon: (w83795) Simplify temperature sensor type handling
All 3 temperature sensor type sysfs functions (show_temp_mode,
store_temp_mode and show_dts_mode) can be simplified. We don't
create these files when the correponding input isn't in temperature
monitoring mode, so there is no point in handling that case.
Likewise, we don't allow changing inputs from temperature to voltage,
so the code handling this case is dead and can be removed.
Signed-off-by: Jean Delvare <khali@linux-fr.org>