A check for a valid plat->sysctrl was introduced in:
2377e52 mfd: ab8500-sysctrl: Error check clean up
but the driver works just fine even without that initialization data,
and enforcing it breaks existing platforms for no reason.
This patch removes the check and let the driver go ahead with probe.
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
AB8500 sysctrl driver implements a pm_power_off handler, but that is
currently not registered until a specific platform data field is
enabled.
This patch drops the platform data field and always registers
ab8500_power_off if no other pm_power_off handler was defined before,
and also introduces the necessary cleanup code in the driver's remove
function.
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The driver requires sysctrl_dev to be set at probe, as it's used by
other driver functions. This was dropped by mistake in:
2377e52 mfd: ab8500-sysctrl: Error check clean up
making all driver functions fail.
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Fix sparse warning:
drivers/mfd/ab8500-sysctrl.c:26:6: warning: symbol 'ab8500_power_off' was not declared. Should it be static?
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Fabio Baltieri <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
The abx500-clk driver is initiated at arch_initcall level. Moreover it
is relying on the ab8500-sysctrl API to be available. Therefore move
ab8500-sysctrl to arch_initcall level as well. The device is already
added before the abx500 clk device, thus it will be probed before as
well, which is exactly what we want.
Signed-off-by: Ulf Hansson <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Add error checks to see if sysctrl was probed as it should.
If the sysctrl_dev is not set the return value is -EINVAL.
Signed-off-by: Marcus Danielsson <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Reviewed-by: Mattias WALLIN <[email protected]>
Tested-by: Per FORLIN <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
In L9540, turn_on_status register is not updated correctly if
the device is rebooted with AC/USB charger connected. Due to
this, the device boots android instead of entering into charge
only mode. Read the AC/USB status register to detect the charger
presence and update the turn on status manually.
Signed-off-by: Rajkumar Kasirajan <[email protected]>
Signed-off-by: Per Forlin <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Reviewed-by: Rupesh KUMAR <[email protected]>
Reviewed-by: Philippe LANGLAIS <[email protected]>
Tested-by: Rupesh KUMAR <[email protected]>
Tested-by: Philippe LANGLAIS <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Export ab8500_sysctrl_read() and ab8500_sysctrl_write() symobols.
They will be used by LTP test cases.
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Jonas Aaberg <[email protected]>
Reviewed-by: Bengt JONSSON <[email protected]>
Add the possibility to pass configuration settings for
SysCl1kReqRfClkBuf to SysClk8ReqRfClkBuf via platform data.
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Kennet Wallden <[email protected]>
Reviewed-by: Karl-Johan PERNTZ <[email protected]>
Reviewed-by: Bengt JONSSON <[email protected]>
It's possible to supply a string to provide a reason for
triggering a restart. In this case our reason is to enter
charging-only mode, as a charger was found to be present.
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Jonas Aaberg <[email protected]>
Reviewed-by: Karl KOMIEROWSKI <[email protected]>
When a charger is connected, we usually want AB8500 based systems to
reboot into charging-only mode. However, if the battery type cannot
be identified this would be futile, so we'll just shut the system
down instead.
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Jonas Aaberg <[email protected]>
Reviewed-by: Karl KOMIEROWSKI <[email protected]>
If a charger is attached on power off, reboot the system
into charging mode instead of powering it off.
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Jonas Aaberg <[email protected]>
Reviewed-by: Karl KOMIEROWSKI <[email protected]>
The kernel allows us to specify a function call-back which will be
invoked when a system power-off request has been received. Here we
provide one which is to be used when shutting down AB8500 based
platforms.
Signed-off-by: Lee Jones <[email protected]>
Now the MFD API is Device Tree aware we can use it for platform
registration again, even when booting with DT enabled. To aid in
Device Node pointer allocation we provide each cell with the
associative compatible string.
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This patch ensures probing of the ab8500-sysctrl driver during a DT
enabled boot, so long as the associated nodes are present in the
Device Tree binary.
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
This moves all the header files related to the abx500 family into
a common include directory below mfd. From now on we place any
subchip header in that directory. Headers previously in e.g.
<linux/mfd/ab8500/gpio.h> get prefixed and are now e.g.
<linux/mfd/abx500/ab8500-gpio.h>. The top-level abstract interface
remains in <linux/mfd/abx500.h>.
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
With the pending module.h cleanup, these files will fail to compile,
unless they explicitly call out the include of this file.
[omap-usb-host addition courtesy of Anand Gadiyar <[email protected]>]
Signed-off-by: Paul Gortmaker <[email protected]>
This adds a pretty straight-forward system control driver for the
AB8500. This driver will be used from the core platform, e.g the
clock tree implementation in the machine code, and is by nature
singleton.
There are a few simple functions to read, write, set and clear
registers so that the machine code can control its own foundation.
Cc: Mattias Wallin <[email protected]>
Signed-off-by: Mattias Nilsson <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>