12 Jul, 2016
1 commit
-
Except for the constant DB8500_PRCMU_FW_VERSION_OFFSET number, nothing
is ever passed through the platform data and used in a driver, so we
can simply stop passing it around.Acked-by: Lee Jones
Signed-off-by: Arnd Bergmann
Signed-off-by: Linus Walleij
14 Jan, 2016
1 commit
-
WARNING: Block comments use a trailing */ on a separate line
+ * */WARNING: Block comments use a trailing */ on a separate line
+ * bank on higher 8 bits and reg in lower */WARNING: Block comments use a trailing */ on a separate line
+ * bank on higher 8 bits and reg in lower */WARNING: suspect code indent for conditional statements (8, 24)
+ if (unlikely(*offset == 17))
+ *offset = 24;WARNING: suspect code indent for conditional statements (8, 24)
+ if (unlikely(*offset == 16))
+ *offset = 25;WARNING: suspect code indent for conditional statements (8, 24)
+ if ((i == 3) && (*offset >= 24))
+ *offset += 2;WARNING: ENOSYS means 'invalid syscall nr' and nothing else
+ return -ENOSYS;WARNING: static const char * array should probably be static const char * const
+ static const char *switch_off_status[] = {WARNING: static const char * array should probably be static const char * const
+ static const char *turn_on_status[] = {total: 0 errors, 9 warnings, 1867 lines checked
Cc: Linus Walleij
Signed-off-by: Lee Jones
04 Dec, 2015
1 commit
-
The platforms that use the AB8500 define all IRQ resources in the
device tree and they are automatically populated by matching
the .of_compatible string. These static resources are just
surplus baggage these days.Signed-off-by: Linus Walleij
Signed-off-by: Lee Jones
11 Aug, 2015
1 commit
-
set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOENFor IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also modify IRQ_NOPROBE and this has been maintained although it
is not clear that is really needed. There appears to be a great deal of
blind copy and paste of this code.Signed-off-by: Rob Herring
Acked-by: Linus Walleij
Signed-off-by: Lee Jones
22 Jun, 2015
1 commit
-
Constify in various drivers configuration data which is not modified:
- regmap_irq_chip,
- individual regmap_irq's in array,
- regmap_config,
- irq_domain_ops,Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Lee Jones
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
20 Aug, 2014
1 commit
-
The config symbol 'CONFIG_DEBUG_FS' should be protected by a 'ifdef' instead
of a plain 'if'.Signed-off-by: Fabio Estevam
Signed-off-by: Lee Jones
09 Jul, 2014
2 commits
-
Soothes the following checkpatch warnings:
WARNING: line over 80 characters
#151: FILE: drivers/mfd/ab8500-core.c:151:
+ 0, 1, 2, 3, 4, -1, -1, -1, -1, 11, 18, 19, 20, 21, 12, 13, 24, 5, 22, 23,ERROR: spaces required around that '=' (ctx:VxW)
#325: FILE: drivers/mfd/ab8500-core.c:325:
+ ret= mask_and_set_register_interruptible(ab8500, bank, reg,
^WARNING: line over 80 characters
#418: FILE: drivers/mfd/ab8500-core.c:418:
+ else if (offset >= AB9540_INT_GPIO50R && offset = 24))
^ERROR: code indent should use tabs where possible
#576: FILE: drivers/mfd/ab8500-core.c:576:
+ .map = ab8500_irq_map,$WARNING: please, no spaces at the start of a line
#576: FILE: drivers/mfd/ab8500-core.c:576:
+ .map = ab8500_irq_map,$ERROR: code indent should use tabs where possible
#577: FILE: drivers/mfd/ab8500-core.c:577:
+ .xlate = irq_domain_xlate_twocell,$WARNING: please, no spaces at the start of a line
#577: FILE: drivers/mfd/ab8500-core.c:577:
+ .xlate = irq_domain_xlate_twocell,$WARNING: char * array declaration might be better as static const
#1554: FILE: drivers/mfd/ab8500-core.c:1554:
+ static char *switch_off_status[] = {WARNING: char * array declaration might be better as static const
#1563: FILE: drivers/mfd/ab8500-core.c:1563:
+ static char *turn_on_status[] = {WARNING: sizeof *ab8500 should be sizeof(*ab8500)
#1582: FILE: drivers/mfd/ab8500-core.c:1582:
+ ab8500 = devm_kzalloc(&pdev->dev, sizeof *ab8500, GFP_KERNEL);ERROR: space required after that close brace '}'
#1639: FILE: drivers/mfd/ab8500-core.c:1639:
+ }/* Configure AB8500 or AB9540 IRQ */WARNING: line over 80 characters
#1652: FILE: drivers/mfd/ab8500-core.c:1652:
+ ab8500->oldmask = devm_kzalloc(&pdev->dev, ab8500->mask_size, GFP_KERNEL);WARNING: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ...
#1677: FILE: drivers/mfd/ab8500-core.c:1677:
+ printk(KERN_CONT " \"%s\"",WARNING: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ...
#1682: FILE: drivers/mfd/ab8500-core.c:1682:
+ printk(KERN_CONT "\n");WARNING: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(... to printk(KERN_CONT ...
#1684: FILE: drivers/mfd/ab8500-core.c:1684:
+ printk(KERN_CONT " None\n");WARNING: printk() should include KERN_ facility level
#1695: FILE: drivers/mfd/ab8500-core.c:1695:
+ printk("\"%s\" ", turn_on_status[i]);WARNING: printk() should include KERN_ facility level
#1700: FILE: drivers/mfd/ab8500-core.c:1700:
+ printk("None\n");total: 5 errors, 14 warnings, 1869 lines checked
Reviewed-by: Linus Walleij
Signed-off-by: Lee Jones -
Save a line of code (albeit, it's replaced by a blank line, but
still), as the else is superfluous.Reviewed-by: Linus Walleij
Signed-off-by: Lee Jones
26 Jun, 2014
1 commit
-
The AD8500 defines itself as interrupt-controller in DT,
but it doesn't assign DT node to IRQ domain when creates it.
As result, of_irq_xx() helpers don't work because they can't
find necessary IRQ domain.Hence, fix it by assigning AD8500 core device DT node to IRQ
domain when it's created.This patch fixes STE u8500 Snowball boot failure reported by Kevin Hilman
https://lkml.org/lkml/2014/5/27/624Reported-and-tested-by: Kevin Hilman
Signed-off-by: Grygorii Strashko
Reviewed-by: Linus Walleij
Signed-off-by: Lee Jones
04 Mar, 2014
1 commit
-
The DBx500 and ABx500 should be getting their IRQs from the
device tree and nowhere else. Get rid of all the static assignments
everywhere, delete it from the driver, platform data and the
board files in one swift strike.Lots of cross-dependencies in the MFD drivers for PRCMU and
AB8500 makes it necessary to strike everywhere at once to
eradicate IRQs passed as resources and platform data to the left
and right around the platform.Cc: Mark Brown
Cc: Samuel Ortiz
Acked-by: Lee Jones
Signed-off-by: Linus Walleij
21 Jan, 2014
1 commit
-
All subdrivers use the irqdomain to demux AB8500 IRQs but here
in the hierarchical path we find a leftover instance using the
hard-coded IRQ base. Convert it to use irqdomain with a
oneliner.Signed-off-by: Linus Walleij
Signed-off-by: Lee Jones
06 Jan, 2014
1 commit
-
As of commit 03e361b25ee8dfb1fd9b890072c23c4aae01c6c7 ("mfd: Stop setting
refcounting pointers in original mfd_cell arrays"), the "cell" parameter of
mfd_add_devices() is "const" again. Hence make all cell data passed to
mfd_add_devices() const where possible.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Lee Jones
13 Jun, 2013
4 commits
-
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
Signed-off-by: Lee Jones -
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
Signed-off-by: Lee Jones -
AB8540 RTC have changed between AB8540_cut1 and AB8540_cut2.Different
ressources to define for those two version.Acked-by: Linus Walleij
Signed-off-by: Julien Delacou
Signed-off-by: Alexandre Torgue
Signed-off-by: Lee Jones -
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
Signed-off-by: Fabio Baltieri
Signed-off-by: Lee Jones
17 May, 2013
3 commits
-
When booting with Device Tree enabled the MFD core uses each device's
compatible string to find and allocate its associated of_node pointer,
which in turn is passed to the driver via the platform_device struct.
Without it, the driver won't be able to interrogate the Device Tree or
locate suitable regulators and will most likely fail to probe.Acked-by: Linus Walleij
Signed-off-by: Lee Jones
Signed-off-by: Samuel Ortiz -
When we're using Device Tree to enable GPIO drivers we're forced to be
OS agnostic, thus we are forbidden use names like pinctrl as they are
specific only to Linux, at least for the time being. However, when we
are registering devices using internal systems such as MFD or platform
registration, we can use such terminology. In this case we can and
should use the platform device ID mechanism to specify which device we
wish to utilise by detailing pinctrl-.This patch fixes a regression that when booting with Device Tree
enabled the ABx500 GPIO/Pinctrl devices are not probed.Acked-by: Linus Walleij
Signed-off-by: Lee Jones
Signed-off-by: Samuel Ortiz -
The AB8500 debug code which was merged in parallell with the
multiplatform work incidentally introduced a new instance using
the header which is now deleted, causing this
build regression:drivers/mfd/ab8500-debugfs.c:95:23:
fatal error: mach/irqs.h: No such file or directory
compilation terminated.
make[4]: *** [drivers/mfd/ab8500-debugfs.o] Error 1The code most certainly never worked with device tree either
since that does not rely on this kind of hard-coded interrupt
numbers.Fix the problem at the root by passing it as a named resource
from the ab8500-core driver. Use an untyped resource to
stop the MFD core from remapping this IRQ relative to the
AB8500 irqdomain.Signed-off-by: Linus Walleij
Signed-off-by: Lee Jones
Signed-off-by: Samuel Ortiz
09 Apr, 2013
2 commits
-
Add of_comptabile string to the ab8500-usb cell to allow the driver to
grab properties from device-tree when available.Signed-off-by: Fabio Baltieri
Signed-off-by: Samuel Ortiz -
AB8500 asserts LATCH bits for masked out interrupts. This patch
explicitly masks those out using the cached mask value to prevent
handle_nested_irq() being called for masked IRQ on the same register as
unmasked ones.Acked-by: Linus Walleij
Signed-off-by: Fabio Baltieri
Signed-off-by: Samuel Ortiz
07 Mar, 2013
11 commits
-
Add support for a power cut feature which allows user to
configure when ab8505 and ab8540 based platforms should shut
down system due to low battery.Signed-off-by: Lee Jones
-
Make use of the hierarchical interrupt rergister called
ITLatchHier1 - 3 also for the 8500 platform (currently the
hierarchical interrupt registers are used only for the 8540
and 9540 platforms). This will make the interrupt routing
go faster since fewer i2c reads need to made in the most
common cases.Signed-off-by: Dariusz Szymczak
Signed-off-by: Lee Jones
Reviewed-by: Mian Yousaf KAUKAB
Acked-by: Samuel Ortiz -
Hierarchically, the abx500-clk shall be considered as a child of the
ab8500 core. The abx500-clk is intiated at arch init and thus the clks
will be available when clients needs them.Signed-off-by: Ulf Hansson
Signed-off-by: Lee Jones
Reviewed-by: Philippe LANGLAIS
Reviewed-by: Patrice CHOTARD
Reviewed-by: Gabriel FERNANDEZ
Reviewed-by: Philippe BEGNIC
Acked-by: Samuel Ortiz -
Several states can be detected when a device is initially turned on.
This patch displays these states in the log. If none of the states
are true, then we report that too.Signed-off-by: Mattias Wallin
Signed-off-by: Lee Jones
Reviewed-by: Marcus COOPER
Reviewed-by: Jonas ABERG
Acked-by: Samuel Ortiz -
Add VBUS_DET_R, VBUS_DET_F IRQ, ID_DET_PLUGR and ID_DET_PLUGF IRQ
information to ab8505_iddet_resources. These are required to get
interrupts for AB8505 cut-2.Signed-off-by: Lee Jones
Acked-by: Samuel Ortiz -
Signed-off-by: Alexandre Torgue
Signed-off-by: Lee Jones
Reviewed-by: Marcus COOPER
Reviewed-by: Mattias WALLIN
Tested-by: Maxime COQUELIN
Acked-by: Samuel Ortiz -
ITSource/ITLatch 7, 8, 9 and 10 don't exist on AB8540. This patch
replaces them with '-1' in the interrupt list, and handles the '-1'
in the code accordingly.Signed-off-by: Lee Jones
Acked-by: Samuel Ortiz -
Here we're separating Battery Management devices into their own
structure, removing the common device structure & redistribute them
amongst the individual platform structs and completing the population
of them.Signed-off-by: Lee Jones
Acked-by: Samuel Ortiz -
Signed-off-by: Lee Jones
Acked-by: Samuel Ortiz -
There are missing register descriptions from the AB8505 user manual
and these need to be masked so that the APEINT line can toggle.
This patch also affects the behaviour of AB9540.Signed-off-by: Marcus Cooper
Signed-off-by: Lee Jones
Reviewed-by: Maxime COQUELIN
Reviewed-by: Alexandre TORGUE
Reviewed-by: Mattias WALLIN
Acked-by: Samuel Ortiz -
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
Signed-off-by: Per Forlin
Signed-off-by: Lee Jones
Reviewed-by: Rupesh KUMAR
Reviewed-by: Philippe LANGLAIS
Tested-by: Rupesh KUMAR
Tested-by: Philippe LANGLAIS
Acked-by: Samuel Ortiz
25 Feb, 2013
1 commit
-
Pull MFS updates from Samuel Ortiz:
"This is the MFD pull request for the 3.9 merge window.No new drivers this time, but a bunch of fairly big cleanups:
- Roger Quadros worked on a OMAP USBHS and TLL platform data
consolidation, OMAP5 support and clock management code cleanup.- The first step of a major sync for the ab8500 driver from Lee
Jones. In particular, the debugfs and the sysct interfaces got
extended and improved.- Peter Ujfalusi sent a nice patchset for cleaning and fixing the
twl-core driver, with a much needed module id lookup code
improvement.- The regular wm5102 and arizona cleanups and fixes from Mark Brown.
- Laxman Dewangan extended the palmas APIs in order to implement the
palmas GPIO and rt drivers.- Laxman also added DT support for the tps65090 driver.
- The Intel SCH and ICH drivers got a couple fixes from Aaron Sierra
and Darren Hart.- Linus Walleij patchset for the ab8500 driver allowed ab8500 and
ab9540 based devices to switch to the new abx500 pin-ctrl driver.- The max8925 now has device tree and irqdomain support thanks to
Qing Xu.- The recently added rtsx driver got a few cleanups and fixes for a
better card detection code path and now also supports the RTS5227
chipset, thanks to Wei Wang and Roger Tseng."* tag 'mfd-3.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (109 commits)
mfd: lpc_ich: Use devres API to allocate private data
mfd: lpc_ich: Add Device IDs for Intel Wellsburg PCH
mfd: lpc_sch: Accomodate partial population of the MFD devices
mfd: da9052-i2c: Staticize da9052_i2c_fix()
mfd: syscon: Fix sparse warning
mfd: twl-core: Fix kernel panic on boot
mfd: rtsx: Fix issue that booting OS with SD card inserted
mfd: ab8500: Fix compile error
mfd: Add missing GENERIC_HARDIRQS dependecies
Documentation: Add docs for max8925 dt
mfd: max8925: Add dts
mfd: max8925: Support dt for backlight
mfd: max8925: Fix onkey driver irq base
mfd: max8925: Fix mfd device register failure
mfd: max8925: Add irqdomain for dt
mfd: vexpress: Allow vexpress-sysreg to self-initialise
mfd: rtsx: Support RTS5227
mfd: rtsx: Implement driving adjustment to device-dependent callbacks
mfd: vexpress: Add pseudo-GPIO based LEDs
mfd: ab8500: Rename ab8500 to abx500 for hwmon driver
...
21 Feb, 2013
1 commit
-
Pull battery updates from Anton Vorontsov:
"Four new drivers:- goldfish_battery:
This is Android Emulator battery driver. Originally from Google,
but Intel folks reshaped it for mainline- pm2301_charger:
A new driver for ST-Ericsson 2301 Power Management chip, uses
AB8500 battery management core- qnap-poweroff:
The driver adds poweroff functionality for QNAP NAS boxes
- restart-poweroff:
A generic driver that implements 'power off by restarting'. The
actual poweroff functionality is implemented through a bootloader,
so Linux' task is just to restart the box. The driver is useful on
Buffalo Linkstation LS-XHL and LS-CHLv2 boards. Andrew Lunn worked
on submitting the driver (as well as qnap-poweroff above).Additionally:
- A lot of fixes for ab8500 drivers. This is a part of efforts of
syncing internal ST-Ericsson development tree with the mainline.
Lee Jones @ Linaro worked on compilation and reshaping these
series.- New health properties for the power supplies: "Watchdog timer
expire" and "Safety timer expire"- As usual, a bunch of fixes/cleanups here and there"
* tag 'for-v3.9' of git://git.infradead.org/battery-2.6: (81 commits)
bq2415x_charger: Add support for offline and 100mA mode
generic-adc-battery: Fix forever loop in gab_remove()
goldfish_battery: Add missing GENERIC_HARDIRQS dependency
da9030_battery: Include notifier.h
bq27x00_battery: Fix reporting battery temperature
power/reset: Remove newly introduced __dev* annotations
lp8727_charger: Small cleanup in naming
ab8500_btemp: Demote initcall sequence
ds2782_battery: Add power_supply_changed() calls for proper uevent support
power: Add battery driver for goldfish emulator
u8500-charger: Delay for USB enumeration
ab8500-bm: Remove individual [charger|btemp|fg|chargalg] pdata structures
ab8500-charger: Do not touch VBUSOVV bits
ab8500-fg: Use correct battery charge full design
pm2301: LPN mode control support
pm2301: Enable vbat low monitoring
ab8500-bm: Flush all work queues before suspending
ab8500-fg: Go to INIT_RECOVERY when charger removed
ab8500-charger: Add support for autopower on AB8505 and AB9540
abx500-chargalg: Add new sysfs interface to get current charge status
...Fix up fairly straightforward conflicts in the ab8500 driver. But since
it seems to be ARM-specific, I can't even compile-test the result..
14 Feb, 2013
3 commits
-
…el/git/linusw/linux-pinctrl into for-next
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-
Signed-off-by: Samuel Ortiz
-
We are using a generic abx500 hwmon layer, so rename specific ab8500 to generic
abx500 for hwmon device and driver matching.Signed-off-by: Hongbo Zhang
Signed-off-by: Samuel Ortiz
08 Feb, 2013
2 commits
-
The old AB8500 GPIO driver has been un-BROKEN and converted into a
multi-platform pinctrl driver. If any AB9540 based devices wish to
request any GPIO pins that it offers, they can after this patch.Cc: Samuel Ortiz
Signed-off-by: Lee Jones
Signed-off-by: Linus Walleij -
The old, BROKEN AB8500 GPIO driver has been revamped as a shiny
new pinctrl driver and has been renamed as such. So, if we would
like to make use of it, we need to register it via its new name.Cc: Samuel Ortiz
Signed-off-by: Lee Jones
Signed-off-by: Linus Walleij