WARNING: Possible unnecessary 'out of memory' message
+ if (!davinci_vc) {
+ dev_dbg(&pdev->dev,
total: 0 errors, 1 warnings, 154 lines checked
Signed-off-by: Lee Jones <lee.jones@linaro.org>
ERROR: space prohibited before that ',' (ctx:WxW)
+ da9052_free_irq(da9052, DA9052_IRQ_ADC_EOM , da9052);
total: 1 errors, 0 warnings, 290 lines checked
Cc: Support Opensource <support.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
While we're at it, let's also match the MODULE_LICENSE with the header.
WARNING: please, no space before tabs
+ * ^IMike Rapoport <mike@compulab.co.il>$
WARNING: please, no space before tabs
+ * ^IEric Miao <eric.miao@marvell.com>$
WARNING: quoted string split across lines
+MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>"
+ "Mike Rapoport <mike@compulab.co.il>");
total: 0 errors, 3 warnings, 574 lines checked
Cc: Support Opensource <support.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
WARNING: Comparisons should place the constant on the right side of the test
+ BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size);
WARNING: Comparisons should place the constant on the right side of the test
+ BUG_ON(EC_MSG_PREAMBLE_COUNT > ec_dev->din_size);
total: 0 errors, 2 warnings, 731 lines checked
Signed-off-by: Lee Jones <lee.jones@linaro.org>
ERROR: code indent should use tabs where possible
+ ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$
WARNING: please, no space before tabs
+ ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$
WARNING: please, no spaces at the start of a line
+ ^Iec_dev = devm_kzalloc(dev, sizeof(*ec_dev), GFP_KERNEL);$
total: 1 errors, 2 warnings, 366 lines checked
Signed-off-by: Lee Jones <lee.jones@linaro.org>
ERROR: Macros with complex values should be enclosed in parentheses
+#define INIT_CDEX(_name, _rate) \
+ [ASIC3_CLOCK_##_name] = { \
+ .cdex = CLOCK_CDEX_##_name, \
+ .rate = _rate, \
+ }
WARNING: line over 80 characters
+ ASIC3_GPIO_INT_STATUS);
WARNING: void function return statements are not generally useful
+ return;
+}
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: line over 80 characters
+ asic->tmio_cnf = ioremap((ASIC3_SD_CONFIG_BASE >> asic->bus_shift) +
WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then p
r_err(... to printk(KERN_ERR ...
+ printk(KERN_ERR "kzalloc failed\n");
WARNING: Possible unnecessary 'out of memory' message
+ if (asic == NULL) {
+ printk(KERN_ERR "kzalloc failed\n");
WARNING: Missing a blank line after declarations
+ int retval = 0;
+ retval = platform_driver_probe(&asic3_device_driver, asic3_probe);
total: 1 errors, 13 warnings, 1081 lines checked
Signed-off-by: Lee Jones <lee.jones@linaro.org>
WARNING: Possible unnecessary 'out of memory' message
+ if (!pdata) {
+ dev_err(&client->dev, "Failed to allocate pdata\n");
WARNING: Possible unnecessary 'out of memory' message
+ if (!as3711) {
+ dev_err(&client->dev, "Memory allocation failed\n");
WARNING: line over 80 characters
+ dev_err(&client->dev, "regmap initialization failed: %d\n", ret);
WARNING: line over 80 characters
+ /* We can reuse as3711_subdevs[], it will be copied in mfd_add_devices() */
WARNING: line over 80 characters
+ as3711_subdevs[AS3711_REGULATOR].platform_data = &pdata->regulator;
WARNING: line over 80 characters
+ as3711_subdevs[AS3711_REGULATOR].pdata_size = sizeof(pdata->regulator);
WARNING: line over 80 characters
+ as3711_subdevs[AS3711_BACKLIGHT].platform_data = &pdata->backlight;
WARNING: line over 80 characters
+ as3711_subdevs[AS3711_BACKLIGHT].pdata_size = sizeof(pdata->backlight);
total: 0 errors, 8 warnings, 236 lines checked
Signed-off-by: Lee Jones <lee.jones@linaro.org>
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(5);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
total: 0 errors, 4 warnings, 1407 lines checked
Cc: patches@opensource.wolfsonmicro.com
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
WARNING: please, no space before tabs
+ * ^IMike Rapoport <mike@compulab.co.il>$
WARNING: please, no space before tabs
+ * ^IEric Miao <eric.miao@marvell.com>$
WARNING: please, no space before tabs
+^I.id_table ^I= adp5520_id,$
total: 0 errors, 3 warnings, 365 lines checked
Cc: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
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 '}'
+ }
+ else
WARNING: 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 <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
WARNING: Block comments use a trailing */ on a separate line
+ * not be accessed from here */
WARNING: Block comments use a trailing */ on a separate line
+ * not be accessed from here */
WARNING: Block comments use a trailing */ on a separate line
+ * the output is wanted in any case */
WARNING: Consecutive strings are generally better as a single string
+ " addr=0x%08X, mask=0x%X, shift=%d" "value=0x%X\n",
total: 0 errors, 4 warnings, 3331 lines checked
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
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 <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
WARNING: Missing a blank line after declarations
+ struct ab3100 *ab3100 = dev_get_drvdata(dev->parent);
+ if (!ab3100->startup_events_read)
WARNING: Possible unnecessary 'out of memory' message
+ if (!ab3100) {
+ dev_err(&client->dev, "could not allocate AB3100 device\n");
WARNING: else is not generally useful after a break or return
+ break;
+ } else {
total: 0 errors, 3 warnings, 996 lines checked
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
WARNING: Possible unnecessary 'out of memory' message
+ if (!aat2870) {
+ dev_err(&client->dev,
total: 0 errors, 1 warnings, 524 lines checked
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Checkpatch output:
WARNING: Block comments use a trailing */ on a separate line
+ * - turn off */
WARNING: Missing a blank line after declarations
+ int ret;
+ ret = i2c_add_driver(&pm860x_driver);
total: 0 errors, 2 warnings, 1283 lines checked
Signed-off-by: Lee Jones <lee.jones@linaro.org>
As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.
Cc: Paul Parsons <lost.distance@yahoo.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.
This also start to propagate the negative error code from the
smbus call if there is one, as the last commit of this series
will make the gpiolib core deal with that properly.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
- Add a debugfs-based interface for interacting with the ACPICA's
AML debugger introduced in the previous cycle and a new user
space tool for that, fix some bugs related to the AML debugger
and clean up the code in question (Lv Zheng, Dan Carpenter,
Colin Ian King, Markus Elfring).
- Update ACPICA to upstream revision 20151218 including a number
of fixes and cleanups in the ACPICA core (Bob Moore, Lv Zheng,
Labbe Corentin, Prarit Bhargava, Colin Ian King, David E Box,
Rafael Wysocki).
In particular, the previously added erroneous support for the
_SUB object is dropped, the concatenate operator will support
all ACPI objects now, the Debug Object handling is improved,
the SuperName handling of parameters being control methods is
fixed, the ObjectType operator handling is updated to follow
ACPI 5.0A and the handling of CondRefOf and RefOf is updated
accordingly, module-level code will be executed after loading
each ACPI table now (instead of being run once after all tables
containing AML have been loaded), the Operation Region handlers
management is updated to fix some reported problems and a the
ACPICA code in the kernel is more in line with the upstream
now.
- Update the ACPI backlight driver to provide information on
whether or not it will generate key-presses for brightness
change hotkeys and update some platform drivers (dell-wmi,
thinkpad_acpi) to use that information to avoid sending double
key-events to users pace for these, add new ACPI backlight
quirks (Hans de Goede, Aaron Lu, Adrien Schildknecht).
- Improve the ACPI handling of interrupt GPIOs (Christophe Ricard).
- Fix the handling of the list of device IDs of device objects
found in the ACPI namespace and add a helper for checking if
there is a device object for a given device ID (Lukas Wunner).
- Change the logic in the ACPI namespace scanning code to create
struct acpi_device objects for all ACPI device objects found in
the namespace even if _STA fails for them which helps to avoid
device enumeration problems on Microsoft Surface 3 (Aaron Lu).
- Add support for the APM X-Gene ACPI I2C device to the ACPI
driver for AMD SoCs (Loc Ho).
- Fix the long-standing issue with the DMA controller on Intel
SoCs where ACPI tables have no power management support for
the DMA controller itself, but it can be powered off automatically
when the last (other) device on the SoC is powered off via ACPI
and clean up the ACPI driver for Intel SoCs (acpi-lpss) after
previous attempts to fix that problem (Andy Shevchenko).
- Assorted ACPI fixes and cleanups (Andy Lutomirski, Colin Ian King,
Javier Martinez Canillas, Ken Xue, Mathias Krause, Rafael Wysocki,
Sinan Kaya).
- Update the device properties framework for better handling of
built-in properties, add support for built-in properties to
the platform bus type, update the MFD subsystem's handling
of device properties and add support for passing default
configuration data as device properties to the intel-lpss MFD
drivers, convert the designware I2C driver to use the unified
device properties API and add a fallback mechanism for using
default built-in properties if the platform firmware fails
to provide the properties as expected by drivers (Andy Shevchenko,
Mika Westerberg, Heikki Krogerus, Andrew Morton).
- Add new Device Tree bindings to the Operating Performance Points
(OPP) framework and update the exynos4412 DT binding accordingly,
introduce debugfs support for the OPP framework (Viresh Kumar,
Bartlomiej Zolnierkiewicz).
- Migrate the mt8173 cpufreq driver to the new OPP bindings
(Pi-Cheng Chen).
- Update the cpufreq core to make the handling of governors
more efficient, especially on systems where policy objects
are shared between multiple CPUs (Viresh Kumar, Rafael Wysocki).
- Fix cpufreq governor handling on configurations with
CONFIG_HZ_PERIODIC set (Chen Yu).
- Clean up the cpufreq core code related to the boost sysfs knob
support and update the ACPI cpufreq driver accordingly (Rafael
Wysocki).
- Add a new cpufreq driver for ST platforms and corresponding
Device Tree bindings (Lee Jones).
- Update the intel_pstate driver to allow the P-state selection
algorithm used by it to depend on the CPU ID of the processor it
is running on, make it use a special P-state selection algorithm
(with an IO wait time compensation tweak) on Atom CPUs based on
the Airmont and Silvermont cores so as to reduce their energy
consumption and improve intel_pstate documentation (Philippe
Longepe, Srinivas Pandruvada).
- Update the cpufreq-dt driver to support registering cooling
devices that use the (P * V^2 * f) dynamic power draw formula
where V is the voltage, f is the frequency and P is a constant
coefficient provided by Device Tree and update the arm_big_little
cpufreq driver to use that support (Punit Agrawal).
- Assorted cpufreq driver (cpufreq-dt, qoriq, pcc-cpufreq,
blackfin-cpufreq) updates (Andrzej Hajda, Hongtao Jia,
Jacob Tanenbaum, Markus Elfring).
- cpuidle core tweaks related to polling and measured_us
calculation (Rik van Riel).
- Removal of modularity from a few cpuidle drivers (clps711x,
ux500, exynos) that cannot be built as modules in practice
(Paul Gortmaker).
- PM core update to prevent devices from being probed during
system suspend/resume which is generally problematic and may
lead to inconsistent behavior (Grygorii Strashko).
- Assorted updates of the PM core and related code (Julia Lawall,
Manuel Pégourié-Gonnard, Maruthi Bayyavarapu, Rafael Wysocki,
Ulf Hansson).
- PNP bus type updates (Christophe Le Roy, Heiner Kallweit).
- PCI PM code cleanups (Jarkko Nikula, Julia Lawall).
- cpupower tool updates (Jacob Tanenbaum, Thomas Renninger).
/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABCAAGBQJWlZOmAAoJEILEb/54YlRxxtEP/ioR0xMOJQcWd5F6Oyj1PZsx
vJeXsmL3fXFAlr6riaE966QqclhUTDhhex3kbFmNQvM8WukxOmBWy5UMSjRg2UmM
PHrogc/KrrE+xb8hjGZPgqVr+/L9O3C6lZmM+AUciT0hWZJckYgRh5TpHb1xN/Kx
MptvtSXRBM62LWytug+EwA4SHt7OFS0yJ/CI1pKvODVtLaYDIPI5k+4ilPU7y6Be
vfoysvmUozNTEYxgPOPXfoQqW2P5t2df32Re31uKtLenLXbc8KW0wIYm24DXgSK6
V/TyDVZTNaZk6OpTqWrjqFbedpGvcBpViwYEY7yv33GDCpXGdHQl3ga+Jy6PAUem
7oGDZtA+5Di/8szhH/wSdpXwSaKEeUdFiaj6Uw2MAwiY4wzv5+WmLRcuIjQFDAxT
elrTbQhAgaMlMsUkQ9NV4GC7ByUeeQX2NpCielsHngOQgKdYRQHyYUgGXc2Wgjdq
UnVrIWRHzXSED0RtPI7IT0Y4PSxkM9UoSEiVUwt3srCue2CFzuENs23qaDgAzeDa
5uwnDl4RhI2BrLVT1WhioIFgFE5Yh5Xx6dSGC+jcU2ss8r2oN6DdUbqOzWAa1iR4
sFhgwwwizpCCfB6pSqEuDdg8W56HjvE9kQY9kcTPPNPbktL0VImC+iiSN/CgZJv9
MH9NbQM8uHkfNcpjsN7V
=OlYA
-----END PGP SIGNATURE-----
Merge tag 'pm+acpi-4.5-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull oower management and ACPI updates from Rafael Wysocki:
"As far as the number of commits goes, ACPICA takes the lead this time,
followed by cpufreq and the device properties framework changes.
The most significant new feature is the debugfs-based interface to the
ACPICA's AML debugger added in the previous cycle and a new user space
tool for accessing it.
On the cpufreq front, the core is updated to handle governors more
efficiently, particularly on systems where a single cpufreq policy
object is shared between multiple CPUs, and there are quite a few
changes in drivers (intel_pstate, cpufreq-dt etc).
The device properties framework is updated to handle built-in (ie
included in the kernel itself) device properties better, among other
things by adding a fallback mechanism that will allow drivers to
provide default properties to be used in case the plaform firmware
doesn't provide the properties expected by them.
The Operating Performance Points (OPP) framework gets new DT bindings
and debugfs support.
A new cpufreq driver for ST platforms is added and the ACPI driver for
AMD SoCs will now support the APM X-Gene ACPI I2C device.
The rest is mostly fixes and cleanups all over.
Specifics:
- Add a debugfs-based interface for interacting with the ACPICA's AML
debugger introduced in the previous cycle and a new user space tool
for that, fix some bugs related to the AML debugger and clean up
the code in question (Lv Zheng, Dan Carpenter, Colin Ian King,
Markus Elfring).
- Update ACPICA to upstream revision 20151218 including a number of
fixes and cleanups in the ACPICA core (Bob Moore, Lv Zheng, Labbe
Corentin, Prarit Bhargava, Colin Ian King, David E Box, Rafael
Wysocki).
In particular, the previously added erroneous support for the _SUB
object is dropped, the concatenate operator will support all ACPI
objects now, the Debug Object handling is improved, the SuperName
handling of parameters being control methods is fixed, the
ObjectType operator handling is updated to follow ACPI 5.0A and the
handling of CondRefOf and RefOf is updated accordingly, module-
level code will be executed after loading each ACPI table now
(instead of being run once after all tables containing AML have
been loaded), the Operation Region handlers management is updated
to fix some reported problems and a the ACPICA code in the kernel
is more in line with the upstream now.
- Update the ACPI backlight driver to provide information on whether
or not it will generate key-presses for brightness change hotkeys
and update some platform drivers (dell-wmi, thinkpad_acpi) to use
that information to avoid sending double key-events to users pace
for these, add new ACPI backlight quirks (Hans de Goede, Aaron Lu,
Adrien Schildknecht).
- Improve the ACPI handling of interrupt GPIOs (Christophe Ricard).
- Fix the handling of the list of device IDs of device objects found
in the ACPI namespace and add a helper for checking if there is a
device object for a given device ID (Lukas Wunner).
- Change the logic in the ACPI namespace scanning code to create
struct acpi_device objects for all ACPI device objects found in the
namespace even if _STA fails for them which helps to avoid device
enumeration problems on Microsoft Surface 3 (Aaron Lu).
- Add support for the APM X-Gene ACPI I2C device to the ACPI driver
for AMD SoCs (Loc Ho).
- Fix the long-standing issue with the DMA controller on Intel SoCs
where ACPI tables have no power management support for the DMA
controller itself, but it can be powered off automatically when the
last (other) device on the SoC is powered off via ACPI and clean up
the ACPI driver for Intel SoCs (acpi-lpss) after previous attempts
to fix that problem (Andy Shevchenko).
- Assorted ACPI fixes and cleanups (Andy Lutomirski, Colin Ian King,
Javier Martinez Canillas, Ken Xue, Mathias Krause, Rafael Wysocki,
Sinan Kaya).
- Update the device properties framework for better handling of
built-in properties, add support for built-in properties to the
platform bus type, update the MFD subsystem's handling of device
properties and add support for passing default configuration data
as device properties to the intel-lpss MFD drivers, convert the
designware I2C driver to use the unified device properties API and
add a fallback mechanism for using default built-in properties if
the platform firmware fails to provide the properties as expected
by drivers (Andy Shevchenko, Mika Westerberg, Heikki Krogerus,
Andrew Morton).
- Add new Device Tree bindings to the Operating Performance Points
(OPP) framework and update the exynos4412 DT binding accordingly,
introduce debugfs support for the OPP framework (Viresh Kumar,
Bartlomiej Zolnierkiewicz).
- Migrate the mt8173 cpufreq driver to the new OPP bindings (Pi-Cheng
Chen).
- Update the cpufreq core to make the handling of governors more
efficient, especially on systems where policy objects are shared
between multiple CPUs (Viresh Kumar, Rafael Wysocki).
- Fix cpufreq governor handling on configurations with
CONFIG_HZ_PERIODIC set (Chen Yu).
- Clean up the cpufreq core code related to the boost sysfs knob
support and update the ACPI cpufreq driver accordingly (Rafael
Wysocki).
- Add a new cpufreq driver for ST platforms and corresponding Device
Tree bindings (Lee Jones).
- Update the intel_pstate driver to allow the P-state selection
algorithm used by it to depend on the CPU ID of the processor it is
running on, make it use a special P-state selection algorithm (with
an IO wait time compensation tweak) on Atom CPUs based on the
Airmont and Silvermont cores so as to reduce their energy
consumption and improve intel_pstate documentation (Philippe
Longepe, Srinivas Pandruvada).
- Update the cpufreq-dt driver to support registering cooling devices
that use the (P * V^2 * f) dynamic power draw formula where V is
the voltage, f is the frequency and P is a constant coefficient
provided by Device Tree and update the arm_big_little cpufreq
driver to use that support (Punit Agrawal).
- Assorted cpufreq driver (cpufreq-dt, qoriq, pcc-cpufreq,
blackfin-cpufreq) updates (Andrzej Hajda, Hongtao Jia, Jacob
Tanenbaum, Markus Elfring).
- cpuidle core tweaks related to polling and measured_us calculation
(Rik van Riel).
- Removal of modularity from a few cpuidle drivers (clps711x, ux500,
exynos) that cannot be built as modules in practice (Paul
Gortmaker).
- PM core update to prevent devices from being probed during system
suspend/resume which is generally problematic and may lead to
inconsistent behavior (Grygorii Strashko).
- Assorted updates of the PM core and related code (Julia Lawall,
Manuel Pégourié-Gonnard, Maruthi Bayyavarapu, Rafael Wysocki, Ulf
Hansson).
- PNP bus type updates (Christophe Le Roy, Heiner Kallweit).
- PCI PM code cleanups (Jarkko Nikula, Julia Lawall).
- cpupower tool updates (Jacob Tanenbaum, Thomas Renninger)"
* tag 'pm+acpi-4.5-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (177 commits)
PM / clk: don't leave clocks enabled when driver not bound
i2c: dw: Add APM X-Gene ACPI I2C device support
ACPI / APD: Add APM X-Gene ACPI I2C device support
ACPI / LPSS: change 'does not have' to 'has' in comment
Revert "dmaengine: dw: platform: provide platform data for Intel"
dmaengine: dw: return immediately from IRQ when DMA isn't in use
dmaengine: dw: platform: power on device on shutdown
ACPI / LPSS: override power state for LPSS DMA device
PM / OPP: Use snprintf() instead of sprintf()
Documentation: cpufreq: intel_pstate: enhance documentation
ACPI, PCI, irq: remove redundant check for null string pointer
ACPI / video: driver must be registered before checking for keypresses
cpufreq-dt: fix handling regulator_get_voltage() result
cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC
PM / sleep: Add support for read-only sysfs attributes
ACPI: Fix white space in a structure definition
ACPI / SBS: fix inconsistent indenting inside if statement
PNP: respect PNP_DRIVER_RES_DO_NOT_CHANGE when detaching
ACPI / PNP: constify device IDs
ACPI / PCI: Simplify acpi_penalize_isa_irq()
...
As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Add device tree bindings to support specifying outputs from the chip as
mono outputs. Whilst we are doing it change the out_mono pdata from a
bool to an int, because Sparse gets upset about using ARRAY_SIZE on
bools.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Allow support for the DA9063 PMIC to be modular, cfr. DA9062, which
allows to decrease size of multi-platform kernels (e.g.
multi_v7_defconfig).
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Currently the driver requests the boot done and control interface IRQs
before it has requested its own IRQ line. This can cause problems on
edge triggered IRQ systems as if an edge occurs before the parent IRQ is
enabled it will be missed. Whilst we are changing the error handling
remove an unused label as well.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The newly introduced as3722_i2c_suspend/resume functions are built
unconditionally, but only used when power management is enabled,
so we get a warning otherwise:
drivers/mfd/as3722.c:427:12: warning: 'as3722_i2c_suspend' defined but not used [-Wunused-function]
drivers/mfd/as3722.c:438:12: warning: 'as3722_i2c_resume' defined but not used [-Wunused-function]
This marks them both as __maybe_unused, which avoids an ugly #ifdef
and gives us best compile-time coverage. When they are unused, the
compiler will silently drop the functions from its output.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 35deff7eb2 ("mfd: as3722: Handle interrupts on suspend")
Signed-off-by: Lee Jones <lee.jones@linaro.org>
These new helpers simplify implementing multi-driver modules and
properly handle failure to register one driver by unregistering all
previously registered drivers.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Revision ID registers are available only on devices with
Slave IDs that are even, so don't make access to unavailable
registers.
Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
[sboyd@codeaurora.org: Consider all slave ids that are even]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
wm831x_unique_id_show currently displays an interesting pattern of '0'
and '3' characters which isn't very useful (figuring out why is left
as an exercise for the reader). Presumably "buf[i]" should have been
"id[i] & 0xff".
But while there, it is much simpler to simply use %phN and do all the
formatting at once.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Currently syscon has a fixed configuration of 32 bits for register and
values widths. In some cases, it would be desirable to be able to
customize the value width.
For example, certain boards (like the ones manufactured by Technologic
Systems) have a FPGA that is memory-mapped, but its registers are only
16-bit wide.
This patch adds an optional "reg-io-width" DT binding for syscon that
allows to change the width for the data bus (i.e. val_bits). If this
property is provided, it will also set the register stride to
reg-io-width's value. If not provided, the default configuration is
used.
Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
cros_ec_cmd_xfer_spi and cros_ec_pkt_xfer_spi generally work like
this:
- Pull CS down (active), wait a bit, then send a command
- Wait for response (multiple requests)
- Wait a while, pull CS up (inactive)
These operations, individually, lock the SPI bus, but there is
nothing preventing the SPI framework from interleaving messages
intended for other devices as the bus is unlocked in between.
This is a problem as the EC expects CS to be held low for the
whole duration.
Solution: Lock the SPI bus during the whole transaction, to make
sure that no other messages can be interleaved.
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The HS-UART host controller driver needs to know certain properties like
width of the register set if it cannot get that information from ACPI or
DT. In order to support non-ACPI systems we pass this information to the
driver via device properties.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Intel Skylake the LPSS I2C pad circuit has internal delays that require
programming non-zero SDA hold time for the I2C host controller. If this is
not done communication to slave devices may fail with arbitration lost
errors like the one seen below taken from Lenovo Yoga 900:
i2c_hid i2c-SYNA2B29:00: Fetching the HID descriptor
i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: cmd=20 00
i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration
To fix this we follow what the Windows driver is doing and pass the default
SDA hold time of 230 ns to all Intel Skylake host controllers. This still
allows the platform to override these values by passing special ACPI
methods SSCN and FMCN.
Reported-by: Kevin Fenzi <kevin@scrye.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
If the boot firmware does not support ACPI we need a way to pass device
configuration information to the drivers. The unified device properties API
already supports passing platform data via properties so let's take
advantage of that and allow probe drivers to pass set of properties to the
host controller driver.
In order to do that we need to be able to modify the MFD cell corresponding
the host controller, so make the core driver to take copy of the cell
instead of using it directly. Then we can assign info->pset to the
resulting copy of a cell and let the MFD core to assign that to the
resulting device.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
In the similar way like we do for the platform data we propagate the device
properties. For example, in case of Intel LPSS drivers we may provide a
specific property to tell the actual device driver an additional information
such as platform name.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This patch adds the regmap configuration tables and
core MFD handling for the CS47L24 and WM1831 codecs.
Note that compared to the other Arizona codecs, these devices
do not have an LDO1 or micsupp regulators, extcon driver, or
the DCVDD isolation control.
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
of_match_device could return NULL, and so cause a NULL pointer
dereference later.
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
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 <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The da903x_chip_ops structure is never modified, so declare it
as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
For checking if a property is present or not,
use of_property_read_bool instead of of_get_property()
Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The as3722 device is registered as an irqchip and the as3722-rtc interrupt
is one of it's interrupt sources. When using the as3722-rtc as a wake-up
device from suspend, the following is seen:
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 161.119 msecs
PM: late suspend of devices complete after 1.048 msecs
PM: noirq suspend of devices complete after 0.756 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
CPU2: shutdown
CPU3: shutdown
Entering suspend state LP1
Enabling non-boot CPUs ...
CPU1 is up
CPU2 is up
CPU3 is up
PM: noirq resume of devices complete after 0.487 msecs
as3722 4-0040: Failed to read IRQ status: -16
as3722 4-0040: Failed to read IRQ status: -16
as3722 4-0040: Failed to read IRQ status: -16
as3722 4-0040: Failed to read IRQ status: -16
...
The reason why the as3722 interrupt status cannot be read is because the
as3722 interrupt is not masked during suspend and when the as3722-rtc
interrupt occurs, to wake-up the device, the interrupt is seen before the
i2c controller has been resumed in order to read the as3722 interrupt
status.
The as3722-rtc driver sets it's interrupt as a wake-up source during
suspend, which gets propagated to the parent as3722 interrupt. However,
the as3722-rtc driver cannot disable it's interrupt during suspend
otherwise we would never be woken up and so the as3722 must disable it's
interrupt instead.
Fix this by disabling the as3722 interrupt during suspend. To ensure that
a wake-up event from the as3722 is not missing, enable the as3722 interrupt
as a wake-up source before disabling the interrupt on entering suspend.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
The MFD part of wm8994 consists of three files wm8994-core.c,
wm8994-irq.c and wm8994-regmap.c only wm8994-core.c has a
MODULE_DESCRIPTION / LICENSE. These were clearly intended to be built
as a single module, but currently are not. This will lead to a tainted
kernel when loading modules for wm8894-irq.c and wm8994-regmap.c because
are missing a license.
This patch fixes this issue by grouping the three files together into a
single module.
Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>