Saves on code and simplifies the driver, as these resources are now
tracked and freed automatically when the driver is realised.
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
devm_regmap_init_i2c() is device managed and makes cleanup simpler.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
The AB8500 external regulator driver is now a device in its own right,
so it requires registering and probing in the normal way. This patch
will ensure the driver is probed once registered for all devices which
support them.
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.
Signed-off-by: Jingoo Han <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Add of_compatible string to the ab8500-codec cell to allow the driver to
grab handlers such as regulators from device-tree when available.
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
AB8540 RTC have changed between AB8540_cut1 and AB8540_cut2.Different
ressources to define for those two version.
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Julien Delacou <[email protected]>
Signed-off-by: Alexandre Torgue <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
The ab8500-leds driver has never been upstreamed and was replaced by a
PWM framework based driver, so these references are not needed anymore.
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
mfd: arizona: Updates for v3.10
A bunch of enhancements and fixes for the arizona devices, adding a few
new features (the main one being device tree) and improving robustness.
Certain use cases may require specific DRE settings so expose the
necessary registers.
Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The TSC part allows to specify the input lines. The IIO part assumes
that it usues always the last few, that means if IIO has adc-channels
set to 2 it will use channel 6 and 7. However it might make sense to use
only 6.
This patch changes the device property (which was introduced recently
and was never in an official release) in a way that the user can specify
which of the AIN lines should be used. In Addition to this, the name is
now AINx where x is the channel number i.e. for AIN6 we would have 6.
Prior this, it always started counting at 0 which is confusing. In
addition to this, it also checks for correct step number during reading
and does not rely on proper FIFO depth.
Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
TI-adc reads a little better compared to tiadc. And if we add am335x to
it then we have the same naming scheme as the tsc side.
Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Fix the mfd device in the case where a subdevice might not be activated.
Signed-off-by: Pantelis Antoniou <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
This patch removes access to platform data mfd_tscadc_board because the
platform is DT only.
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Add DT support in the MFD core driver. The node name is "am3359" because
it was tested on this platform.
Signed-off-by: Pantelis Antoniou <[email protected]>
Signed-off-by: Patil, Rachna <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
This patch adds DT support to touch driver. It also provides a binding
document which is used by the MFD and IIO part of the device.
This patch also renames steps_to_configure to coordinate_readouts
because the original name misleads the purpose of the variable.
Signed-off-by: Pantelis Antoniou <[email protected]>
Signed-off-by: Patil, Rachna <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Current code has hard coded value written to
step enable bits. Now the bits are updated based
on how many steps are needed to be configured got
from platform data.
The user needs to take care not to exceed
the count more than 16. While using ADC and TSC
one should take care to set this parameter correctly.
Sebastian added the common lock and moved the code, that manipulates the
steps, from into the mfd module.
Signed-off-by: Patil, Rachna <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
The mfd driver creates platform data for the child devices and it is the
ti_tscadc_dev struct. This struct is copied for the two devices.
The copy of the structure makes a common lock in this structure a little
less usefull. Therefore the platform data is not a pointer to the
structure and the same structure is used.
While doing the change I noticed that the suspend/resume code assumes
the wrong pointer for ti_tscadc_dev and this has been fixed as well.
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
This patch adds support for SYSCON driver for CLPS711X targets.
At this time there are no users for this driver, but it is will
be used as start point to use in CLPS711X drivers and remove
<mach/xx> dependencies.
Signed-off-by: Alexander Shiyan <[email protected]>
Signed-off-by: Olof Johansson <[email protected]>
In preparation to switching the jz4740 clk driver to the common clk framework
update the clk enable/disable calls to clk_prepare_enable/clk_disable_unprepare.
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The MAX77686 clock driver has been in-tree for over 6 months, but never
actually enabled through the MFD registration before.
Add it to the table so the device will probe and configure properly.
Signed-off-by: Olof Johansson <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The interrupt controller on the wm8994 series of devices requires a level
triggered parent. If one is not available but a GPIO is available for the
interrupt then emulate.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Lee Jones <[email protected]>
Acked-by: Mika Westerberg <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This patch adds the LPC Controller Device IDs for Watchdog and GPIO for
Intel Avoton SoC, to the lpc_ich driver.
Signed-off-by: James Ralston <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Shift TWL initialization to module/device init layer, because I2C now is
not initialized on subsys init layer and shifted to module/device init
layer instead.
The I2C <--> TWL dependency should be resolved in drivers/Makefile now.
Cc: Santosh Shilimkar <[email protected]>
Signed-off-by: Grygorii Strashko <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Adding support of model RTL8411B. Since the model is similar to RTL8411,
differences are implemented in rtl8411.c.
Signed-off-by: Roger Tseng <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
In case mfd_add_devices will fail, it will call to mfd_remove_devices
by itself and return non-zero value.
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
There is no reason for ssbi to have its own top-level driver directory
when the only users of this interface are all MFD drivers. The only
mainline driver using it at the moment (PM8921) is marked broken and in
fact does not compile. I have verified that fixing the trivial build
breakage in pm8921 links in the new ssbi code just fine, but that
can be a separate patch.
Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Nicolas Pitre <[email protected]>
Acked-by: David Brown <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
BML clock register address in DB8580 has changed.Defined a new address
under different name for DB8580.
Signed-off-by: Philippe Begnic <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
Do not load endian value from platform data
and rather autodetect it.
Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The "index" field of struct cpufreq_frequency_table was never an
index and isn't used at all by the cpufreq core. It only is useful
for cpufreq drivers for their internal purposes.
Many people nowadays blindly set it in ascending order with the
assumption that the core will use it, which is a mistake.
Rename it to "driver_data" as that's what its purpose is. All of its
users are updated accordingly.
[rjw: Changelog]
Signed-off-by: Viresh Kumar <[email protected]>
Acked-by: Simon Horman <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
The "runtime idle" helper routine, rpm_idle(), currently ignores
return values from .runtime_idle() callbacks executed by it.
However, it turns out that many subsystems use
pm_generic_runtime_idle() which checks the return value of the
driver's callback and executes pm_runtime_suspend() for the device
unless that value is not 0. If that logic is moved to rpm_idle()
instead, pm_generic_runtime_idle() can be dropped and its users
will not need any .runtime_idle() callbacks any more.
Moreover, the PCI, SCSI, and SATA subsystems' .runtime_idle()
routines, pci_pm_runtime_idle(), scsi_runtime_idle(), and
ata_port_runtime_idle(), respectively, as well as a few drivers'
ones may be simplified if rpm_idle() calls rpm_suspend() after 0 has
been returned by the .runtime_idle() callback executed by it.
To reduce overall code bloat, make the changes described above.
Tested-by: Mika Westerberg <[email protected]>
Tested-by: Kevin Hilman <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Acked-by: Kevin Hilman <[email protected]>
Reviewed-by: Ulf Hansson <[email protected]>
Acked-by: Alan Stern <[email protected]>
Pull mfd fixes from Samuel Ortiz:
"This is the first batch of MFD fixes for 3.10.
It's bigger than I would like, most of it is due to the big ab/db8500
merge that went through during the 3.10 merge window.
So we have:
- Some build fixes for the tps65912 and ab8500 drivers.
- A couple of build fixes for the the si476x driver with pre 4.3 gcc
compilers.
- A few runtime breakage fixes (probe failures or oopses) for the
ab8500 and db8500 drivers.
- Some sparse or regular gcc warning fixes for the si476x, ab8500 and
cros_ec drivers."
* tag 'mfd-fixes-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes:
mfd: ab8500-sysctrl: Let sysctrl driver work without pdata
mfd: db8500-prcmu: Update stored DSI PLL divider value
mfd: ab8500-sysctrl: Always enable pm_power_off handler
mfd: ab8500-core: Pass GPADC compatible string to MFD core
mfd: db8500-prcmu: Supply the pdata_size attribute for db8500-thermal
mfd: ab8500-core: Use the correct driver name when enabling gpio/pinctrl
mfd: ab8500: Pass AB8500 IRQ to debugfs code by resource
mfd: ab8500-gpadc: Suppress 'ignoring regulator_enable() return value' warning
mfd: ab8500-sysctrl: Set sysctrl_dev during probe
mfd: ab8500-sysctrl: Fix sparse warning
mfd: abx500-core: Fix sparse warning
mfd: ab8500: Debugfs code depends on gpadc
mfd: si476x: Use get_unaligned_be16() for unaligned be16 loads
mfd: cros_ec_spi: Use %z to format pointer differences
mfd: si476x: Do not use binary constants
mfd: tps65912: Select MFD_CORE