14 Jan, 2016
1 commit
-
WARNING: line over 80 characters
+#define ADC_CH_IBAT_MIN (-6000) /* mA range measured by ADC for ib
t*/WARNING: line over 80 characters
+#define ADC_CH_IBAT_MIN_V (-60) /* mV range measured by ADC for ibat*/WARNING: suspect code indent for conditional statements (16, 20)
+ if (!strcmp(name, dev_name(gpadc->dev)))
+ return gpadc;WARNING: suspect code indent for conditional statements (0, 16)
+if (ad_value < 0) {
+ dev_err(gpadc->dev, "GPADC raw value failed ch: %d\n",WARNING: quoted string split across lines
+ dev_err(gpadc->dev, "GPADC to voltage conversion failed ch:"
+ " %d AD: 0x%x\n", channel, ad_value);WARNING: Missing a blank line after declarations
+ int raw_data;
+ raw_data = ab8500_gpadc_double_read_raw(gpadc, channel,WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(10);ERROR: else should follow close brace '}'
+ }
+ elseWARNING: line over 80 characters
+ delay_max = 10000; /* large range to optimise sleep mode */WARNING: line over 80 characters
+ gpadc->cal_data[ADC_INPUT_IBAT].gain = V_gain * V2A_gain;WARNING: line over 80 characters
+ gpadc = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_gpadc), GFP_KERNEL);WARNING: Possible unnecessary 'out of memory' message
+ if (!gpadc) {
+ dev_err(&pdev->dev, "Error: No memory\n");WARNING: space prohibited before semicolon
+ return ;WARNING: void function return statements are not generally useful
+ return ;
+}WARNING: quoted string split across lines
+MODULE_AUTHOR("Arun R Murthy, Daniel Willerud, Johan Palsson,"
+ "M'boumba Cedric Madianga");total: 1 errors, 14 warnings, 1089 lines checked
Cc: Linus Walleij
Signed-off-by: Lee Jones
22 Jun, 2015
1 commit
-
Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.So pass the IRQF_ONESHOT flag in this case.
The semantic patch that makes this change is available
in scripts/coccinelle/misc/irqf_oneshot.cocci.Signed-off-by: Fabio Estevam
Signed-off-by: Lee Jones
15 Dec, 2014
1 commit
-
Pull driver core update from Greg KH:
"Here's the set of driver core patches for 3.19-rc1.They are dominated by the removal of the .owner field in platform
drivers. They touch a lot of files, but they are "simple" changes,
just removing a line in a structure.Other than that, a few minor driver core and debugfs changes. There
are some ath9k patches coming in through this tree that have been
acked by the wireless maintainers as they relied on the debugfs
changes.Everything has been in linux-next for a while"
* tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
fs: debugfs: add forward declaration for struct device type
firmware class: Deletion of an unnecessary check before the function call "vunmap"
firmware loader: fix hung task warning dump
devcoredump: provide a one-way disable function
device: Add dev__once variants
ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
ath: use seq_file api for ath9k debugfs files
debugfs: add helper function to create device related seq_file
drivers/base: cacheinfo: remove noisy error boot message
Revert "core: platform: add warning if driver has no owner"
drivers: base: support cpu cache information interface to userspace via sysfs
drivers: base: add cpu_device_create to support per-cpu devices
topology: replace custom attribute macros with standard DEVICE_ATTR*
cpumask: factor out show_cpumap into separate helper function
driver core: Fix unbalanced device reference in drivers_probe
driver core: fix race with userland in device_add()
sysfs/kernfs: make read requests on pre-alloc files use the buffer.
sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
fs: sysfs: return EGBIG on write if offset is larger than file size
...
05 Dec, 2014
1 commit
-
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
drivers/mfd/.Signed-off-by: Rafael J. Wysocki
Acked-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
15 Aug, 2013
2 commits
-
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the build
warnings when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
when the CONFIG_PM_SLEEP is enabled.drivers/mfd/ab8500-gpadc.c:891:12: warning: 'ab8500_gpadc_suspend' defined but not used [-Wunused-function]
drivers/mfd/ab8500-gpadc.c:903:12: warning: 'ab8500_gpadc_resume' defined but not used [-Wunused-function]Acked-by: Linus Walleij
Signed-off-by: Jingoo Han
Signed-off-by: Lee Jones -
Add CONFIG_PM_RUNTIME to runtime_suspend/runtime_resume functions
to fix the build warnings when CONFIG_PM_RUNTIME is not selected.
This is because runtime PM callbacks defined by SET_RUNTIME_PM_OPS
are only used when the CONFIG_PM_RUNTIME is enabled.drivers/mfd/ab8500-gpadc.c:870:12: warning: 'ab8500_gpadc_runtime_suspend' defined but not used [-Wunused-function]
drivers/mfd/ab8500-gpadc.c:878:12: warning: 'ab8500_gpadc_runtime_resume' defined but not used [-Wunused-function]Acked-by: Linus Walleij
Signed-off-by: Jingoo Han
Signed-off-by: Lee Jones
11 Jul, 2013
1 commit
-
Pull MFD update from Samuel Ortiz:
"For the 3.11 merge we only have one new MFD driver for the Kontron
PLD.But we also have:
- Support for the TPS659038 PMIC from the palmas driver.
- Intel's Coleto Creek and Avoton SoCs support from the lpc_ich
driver.
- RTL8411B support from the rtsx driver.
- More DT support for the Arizona, max8998, twl4030-power and the
ti_am335x_tsadc drivers.
- The SSBI driver move under MFD.
- A conversion to the devm_* API for most of the MFD drivers.
- The twl4030-power got split from twl-core into its own module.
- A major ti_am335x_adc cleanup, leading to a proper DT support.
- Our regular arizona and wm* updates and cleanups from the Wolfson
folks.
- A better error handling and initialization, and a regulator
subdevice addition for the 88pm80x driver.
- A bulk platform_set_drvdata() call removal that's no longer need
since commit 0998d0631001 ("device-core: Ensure drvdata = NULL when
no driver is bound")* tag 'mfd-3.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (102 commits)
mfd: sec: Provide max_register to regmap
mfd: wm8994: Remove duplicate check for active JACKDET
MAINTAINERS: Add include directory to MFD file patterns
mfd: sec: Remove fields not used since regmap conversion
watchdog: Kontron PLD watchdog timer driver
mfd: max8998: Add support for Device Tree
regulator: max8998: Use arrays for specifying voltages in platform data
mfd: max8998: Add irq domain support
regulator: palmas: Add TPS659038 support
mfd: Kontron PLD mfd driver
mfd: palmas: Add TPS659038 PMIC support
mfd: palmas: Add SMPS10_BOOST feature
mfd: palmas: Check if irq is valid
mfd: lpc_ich: iTCO_wdt patch for Intel Coleto Creek DeviceIDs
mfd: twl-core: Change TWL6025 references to TWL6032
mfd: davinci_voicecodec: Fix build breakage
mfd: vexpress: Make the driver optional for arm and arm64
mfd: htc-egpio: Use devm_ioremap_nocache() instead of ioremap_nocache()
mfd: davinci_voicecodec: Convert to use devm_* APIs
mfd: twl4030-power: Fix relocking on error
...
13 Jun, 2013
1 commit
-
Signed-off-by: Lee Jones
Signed-off-by: Samuel Ortiz
04 Jun, 2013
1 commit
-
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
Tested-by: Kevin Hilman
Signed-off-by: Rafael J. Wysocki
Acked-by: Kevin Hilman
Reviewed-by: Ulf Hansson
Acked-by: Alan Stern
17 May, 2013
1 commit
-
drivers/mfd/ab8500-gpadc.c: In function ‘ab8500_gpadc_resume’:
drivers/mfd/ab8500-gpadc.c:911:18: warning: ignoring return value of
‘regulator_enable’, declared with attribute warn_unused_result
[-Wunused-result]Acked-by: Linus Walleij
Acked-by: Srinidhi Kasagar
Signed-off-by: Lee Jones
Signed-off-by: Samuel Ortiz
26 Apr, 2013
1 commit
-
Apparently the ab8500_gpadc_sw_hw_convert function got renamed
from ab8500_gpadc_convert to ab8500_gpadc_sw_hw_convert in
commit 734823462 "mfd: ab8500-gpadc: Add gpadc hw conversion",
but the export for this function did not get changed at the
same time, causing this allyesconfig error:ERROR: "ab8500_gpadc_sw_hw_convert" [drivers/hwmon/ab8500.ko] undefined!
This patch fixes the export.
Signed-off-by: Arnd Bergmann
Cc: M'boumba Cedric Madianga
Cc: Lee Jones
Cc: Mattias WALLIN
Cc: Michel JAOUEN
Acked-by: Linus Walleij
Signed-off-by: Samuel Ortiz
08 Apr, 2013
1 commit
-
Conflicts:
drivers/mfd/ab8500-gpadc.cSigned-off-by: Samuel Ortiz
12 Mar, 2013
1 commit
-
Since commit c8801a8e
"regulator: core: Mark all get and enable calls as __must_check",
we must check return value of regulator_enable() to silence below build warning.CC drivers/mfd/ab8500-gpadc.o
drivers/mfd/ab8500-gpadc.c: In function 'ab8500_gpadc_runtime_resume':
drivers/mfd/ab8500-gpadc.c:598:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]
drivers/mfd/ab8500-gpadc.c: In function 'ab8500_gpadc_probe':
drivers/mfd/ab8500-gpadc.c:655:18: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result [-Wunused-result]Also convert to devm_regulator_get(), this fixes a missing regulator_put() call
in ab8500_gpadc_remove().Signed-off-by: Axel Lin
Signed-off-by: Samuel Ortiz
07 Mar, 2013
7 commits
-
Optimise GPADC driver:
* for code readability and maintenance by grouping similar cheking
* for performance by grouping several writing to control registerSigned-off-by: Alexandre Bourdiol
Signed-off-by: Lee Jones
Reviewed-by: Philippe LANGLAIS
Acked-by: Samuel Ortiz -
Allow GPADC debug information to be shown when executing on an AB8540
based platform.Signed-off-by: Alexandre Bourdiol
Reviewed-by: Marcus COOPER
Reviewed-by: Philippe LANGLAIS
Acked-by: Samuel Ortiz -
This patch enables the GPADC to work on AB8540 based platforms.
Signed-off-by: Lee Jones
Acked-by: Samuel Ortiz -
Signed-off-by: Lee Jones
Acked-by: Samuel Ortiz -
Add the support of gpacd hw conversion and make the number of
sample configurable.Signed-off-by: M'boumba Cedric Madianga
Signed-off-by: Lee Jones
Reviewed-by: Mattias WALLIN
Tested-by: Michel JAOUEN
Acked-by: Samuel Ortiz -
Reread the gpadc once upon failure.
Signed-off-by: Jonas Aaberg
Signed-off-by: Lee Jones
Reviewed-by: Mattias WALLIN
Acked-by: Samuel Ortiz -
suspend/resume methods implemented to prevent suspend while the gpadc
driver is busy.Signed-off-by: Daniel WILLERUD
Signed-off-by: Lee Jones
Reviewed-by: Jonas ABERG
Reviewed-by: Ulf HANSSON
Acked-by: Samuel Ortiz
04 Feb, 2013
5 commits
-
The ab8500_gpadc structure carries lots of important information which
most functions make good use of. The initial expectation was that
ab8500_gpadc_runtime_idle() would be no exception; however, this hasn't
been the case to date. Let's remove it for now and add it back in only
when we have a use for it.Signed-off-by: Lee Jones
-
Reduce the conversion timeout from 2s to 0.5s
Signed-off-by: Lee Jones
Signed-off-by: Jonas Aaberg
Reviewed-by: Karl KOMIEROWSKI -
Add runtime pm support to speed up multiple ADC reads in a row.
Signed-off-by: Lee Jones
Signed-off-by: Jonas Aaberg
Reviewed-by: Ulf HANSSON -
Add support for AB8505 and AB9540
Signed-off-by: Lee Jones
Signed-off-by: Maxime Coquelin
Signed-off-by: Bengt Jonsson
Reviewed-by: Rabin VINCENT -
The resolution of msleep is related to HZ, so with HZ set to
100 any msleep of less than 10ms will become ~10ms.Signed-off-by: Lee Jones
29 Nov, 2012
3 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Cc: Srinidhi Kasagar
Cc: Peter Tyser
Cc: Daniel Walker
Cc: Bryan Huntsman
Acked-by: David Brown
Acked-by: Linus Walleij
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Srinidhi Kasagar
Cc: Peter Tyser
Cc: Daniel Walker
Cc: Bryan Huntsman
Acked-by: David Brown
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.Signed-off-by: Bill Pemberton
Cc: Srinidhi Kasagar
Cc: Peter Tyser
Cc: Daniel Walker
Cc: Bryan Huntsman
Acked-by: David Brown
Acked-by: Linus Walleij
Acked-by: Mark Brown
Signed-off-by: Greg Kroah-Hartman
02 Oct, 2012
1 commit
-
Pull the trivial tree from Jiri Kosina:
"Tiny usual fixes all over the place"* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
doc: fix old config name of kprobetrace
fs/fs-writeback.c: cleanup riteback_sb_inodes kerneldoc
btrfs: fix the commment for the action flags in delayed-ref.h
btrfs: fix trivial typo for the comment of BTRFS_FREE_INO_OBJECTID
vfs: fix kerneldoc for generic_fh_to_parent()
treewide: fix comment/printk/variable typos
ipr: fix small coding style issues
doc: fix broken utf8 encoding
nfs: comment fix
platform/x86: fix asus_laptop.wled_type module parameter
mfd: printk/comment fixes
doc: getdelays.c: remember to close() socket on error in create_nl_socket()
doc: aliasing-test: close fd on write error
mmc: fix comment typos
dma: fix comments
spi: fix comment/printk typos in spi
Coccinelle: fix typo in memdup_user.cocci
tmiofb: missing NULL pointer checks
tools: perf: Fix typo in tools/perf
tools/testing: fix comment / output typos
...
02 Sep, 2012
1 commit
-
Correct spelling typo in drivers/mfd
Signed-off-by: Masanari Iida
Signed-off-by: Jiri Kosina
09 Jul, 2012
2 commits
-
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
Signed-off-by: Samuel Ortiz -
The kernel now forces IRQs to be ONESHOT if no IRQ handler is passed.
Acked-by: Linus Walleij
Signed-off-by: Lee Jones
Signed-off-by: Samuel Ortiz
20 May, 2012
2 commits
-
This patch will allow the ab8500-gpadc driver to be probed during
Device Tree enabled boot.Signed-off-by: Lee Jones
Signed-off-by: Samuel Ortiz -
Before this patch if probe failed to find the platform IRQ it
would attempt to print a message out using dev_err, which in
turn was being passed an unassigned pointer. This patch
ensures the information passed to dev_err is correct.Signed-off-by: Lee Jones
Signed-off-by: Samuel Ortiz
09 Jan, 2012
1 commit
-
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.
get prefixed and are now e.g.
. The top-level abstract interface
remains in .Signed-off-by: Linus Walleij
Signed-off-by: Samuel Ortiz
24 Oct, 2011
1 commit
-
Refactor the GPADC interface to avoid bugs in calling code:
- ab8500_gpadc_[convert|read_raw|ad_to_voltage] clarifies
each functions use case, *convert wraps *read_raw, and we
can access raw ADC values properly.
- Renamed gpadc function arguments from "input" to "channel" to
clarify use, so we don't get confused again.Signed-off-by: Kalle Komierowski
Reviewed-by: Mattias Wallin
Reviewed-by: John Beckett
Signed-off-by: Linus Walleij
Signed-off-by: Samuel Ortiz
27 May, 2011
2 commits
-
The bitmask for enabling the BatTemp pull-up was wrong and
is corrected. The name is also changed to be inline with
the AB8500 register descriptionSigned-off-by: Johan Palsson
Reviewed-by: Mattias Wallin
Signed-off-by: Linus Walleij
Signed-off-by: Samuel Ortiz -
In AB8500 3.0 the pull-up supplying the NTC must be manually activated.
Add enumerators to chip version detection logic.Signed-off-by: Kalle Komierowski
Reviewed-by: Johan Palsson
Reviewed-by: Daniel Willerud
Reviewed-by: Jonas Aberg
Signed-off-by: Linus Walleij
Signed-off-by: Samuel Ortiz
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi