- 09 Jul, 2014 40 commits
-
-
Doug Anderson authored
We know how many bytes the EC should be sending us (which is also the number of bytes transferred) and also how many bytes the EC actually wanted to send to us. When computing the checksum and copying back data let's make sure we take the lesser of the two of those. We'll also complain if the EC tried to send us too many bytes. The EC sending us too few bytes is legit for when we send the EC an invalid command. This is based on similar code in cros_ec_spi. Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
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 <= AB9540_INT_GPIO54R) WARNING: line over 80 characters #420: FILE: drivers/mfd/ab8500-core.c:420: + else if (offset == AB8540_INT_GPIO43R || offset == AB8540_INT_GPIO44R) ERROR: spaces required around that '==' (ctx:VxV) #454: FILE: drivers/mfd/ab8500-core.c:454: + if ((i==3) && (*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 <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
Corrects the following checkpatch gripes: WARNING: quoted string split across lines #95: FILE: drivers/mfd/ab3100-core.c:95: + "write error (write register) " + "%d bytes transferred (expected 2)\n", WARNING: quoted string split across lines #139: FILE: drivers/mfd/ab3100-core.c:139: + "write error (write test register) " + "%d bytes transferred (expected 2)\n", WARNING: quoted string split across lines #175: FILE: drivers/mfd/ab3100-core.c:175: + "write error (send register address) " + "%d bytes transferred (expected 1)\n", WARNING: quoted string split across lines #193: FILE: drivers/mfd/ab3100-core.c:193: + "write error (read register) " + "%d bytes transferred (expected 1)\n", WARNING: quoted string split across lines #241: FILE: drivers/mfd/ab3100-core.c:241: + "write error (send first register address) " + "%d bytes transferred (expected 1)\n", WARNING: quoted string split across lines #256: FILE: drivers/mfd/ab3100-core.c:256: + "write error (read register page) " + "%d bytes transferred (expected %d)\n", WARNING: quoted string split across lines #299: FILE: drivers/mfd/ab3100-core.c:299: + "write error (maskset send address) " + "%d bytes transferred (expected 1)\n", WARNING: quoted string split across lines #314: FILE: drivers/mfd/ab3100-core.c:314: + "write error (maskset read register) " + "%d bytes transferred (expected 1)\n", WARNING: quoted string split across lines #334: FILE: drivers/mfd/ab3100-core.c:334: + "write error (write register) " + "%d bytes transferred (expected 2)\n", WARNING: please, no spaces at the start of a line #374: FILE: drivers/mfd/ab3100-core.c:374: + return blocking_notifier_chain_unregister(&ab3100->event_subscribers,$ WARNING: Prefer seq_puts to seq_printf #458: FILE: drivers/mfd/ab3100-core.c:458: + seq_printf(s, "AB3100 registers:\n"); WARNING: quoted string split across lines #564: FILE: drivers/mfd/ab3100-core.c:564: + "debug write reg[0x%02x] with 0x%02x, " + "after readback: 0x%02x\n", WARNING: quoted string split across lines #723: FILE: drivers/mfd/ab3100-core.c:723: + "AB3100 P1E variant detected, " + "forcing chip to 32KHz\n"); WARNING: quoted string split across lines #882: FILE: drivers/mfd/ab3100-core.c:882: + "could not communicate with the AB3100 analog " + "baseband chip\n"); WARNING: quoted string split across lines #906: FILE: drivers/mfd/ab3100-core.c:906: + dev_err(&client->dev, "accepting it anyway. Please update " + "the driver.\n"); total: 0 errors, 15 warnings, 999 lines checked Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
Soothes checkpatch warning: WARNING: simple_strtoul is obsolete, use kstrtoul instead #306: FILE: drivers/mfd/aat2870-core.c:306: + addr = simple_strtoul(start, &start, 16); Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
Fixes checkpatch warning: WARNING: please, no space before tabs #5: FILE: drivers/mfd/88pm860x-i2c.c:5: + * ^IHaojian Zhuang <haojian.zhuang@marvell.com>$ Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
Fixes the following checkpatch warnings: WARNING: please, no space before tabs #5: FILE: drivers/mfd/88pm860x-core.c:5: + * ^IHaojian Zhuang <haojian.zhuang@marvell.com>$ WARNING: line over 80 characters #143: FILE: drivers/mfd/88pm860x-core.c:143: + {PM8607_IRQ_AUDIO_SHORT, PM8607_IRQ_AUDIO_SHORT, "audio-short", IORESOURCE_IRQ,}, WARNING: line over 80 characters #153: FILE: drivers/mfd/88pm860x-core.c:153: + {PM8607_IRQ_CHG_DONE, PM8607_IRQ_CHG_DONE, "charging done", IORESOURCE_IRQ,}, WARNING: line over 80 characters #154: FILE: drivers/mfd/88pm860x-core.c:154: + {PM8607_IRQ_CHG_FAIL, PM8607_IRQ_CHG_FAIL, "charging timeout", IORESOURCE_IRQ,}, WARNING: line over 80 characters #155: FILE: drivers/mfd/88pm860x-core.c:155: + {PM8607_IRQ_CHG_FAULT, PM8607_IRQ_CHG_FAULT, "charging fault", IORESOURCE_IRQ,}, WARNING: line over 80 characters #156: FILE: drivers/mfd/88pm860x-core.c:156: + {PM8607_IRQ_GPADC1, PM8607_IRQ_GPADC1, "battery temperature", IORESOURCE_IRQ,}, WARNING: Avoid unnecessary line continuations #571: FILE: drivers/mfd/88pm860x-core.c:571: + struct i2c_client *i2c = (chip->id == CHIP_PM8607) ? chip->client \ WARNING: line over 80 characters #634: FILE: drivers/mfd/88pm860x-core.c:634: + ret = request_threaded_irq(chip->core_irq, NULL, pm860x_irq, flags | IRQF_ONESHOT, WARNING: Unnecessary parentheses - maybe == should be = ? #874: FILE: drivers/mfd/88pm860x-core.c:874: + if ((pdata == NULL)) WARNING: quoted string split across lines #1001: FILE: drivers/mfd/88pm860x-core.c:1001: + dev_err(chip->dev, "Failed to detect Marvell 88PM8607. " + "Chip ID: %02x\n", ret); WARNING: quoted string split across lines #1124: FILE: drivers/mfd/88pm860x-core.c:1124: + dev_err(dev, "Not found \"marvell,88pm860x-slave-addr\" " + "property\n"); total: 0 errors, 11 warnings, 1281 lines checked Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
This code has been working since 2012, as limiting the time between 1ms and 3ms is unlikely to do any harm. Soothes checkpatch warning: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt #161: FILE: drivers/mfd/88pm805.c:161: + msleep(1); Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
Extinguishes: ../drivers/mfd/tps65910.c: In function ‘tps65910_parse_dt’: ../drivers/mfd/tps65910.c:404:14: warning: cast from pointer to integer of different size Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
Extinguishes: ../drivers/mfd/arizona-core.c: In function ‘arizona_of_get_type’: ../drivers/mfd/arizona-core.c:505:10: warning: cast from pointer to integer of different size Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
Extinguishes: ../drivers/mfd/stmpe-i2c.c: In function ‘stmpe_i2c_probe’: ../drivers/mfd/stmpe-i2c.c:88:13: warning: cast from pointer to integer of different size partnum = (int)of_id->data; Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
If CONIFG_ACPI is not enabled we receive the following warning: drivers/mfd/intel_soc_pmic_core.c:144:30: warning: ‘intel_soc_pmic_acpi_match’ defined but not used This patch rids it. Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
Noticed during a coding review, if we reorganised the checking a little, we can rid the code of a pointless 'else'. Whilst looking for this particular code hunk I noticed another pointless 'else', which I've subsequently fixed in this patch. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
Save a line of code (albeit, it's replaced by a blank line, but still), as the else is superfluous. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Rickard Strandqvist authored
Unsigned variable can't be negative so it is unnecessary to test it This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Fabian Frederick authored
Fix checkpatch warning: WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Andrew Bresticker authored
If we receive EC interrupts after the cros_ec driver has probed, but before the cros_ec_keyb driver has probed, the cros_ec IRQ handler will not run the cros_ec_keyb notifier and the EC will leave the IRQ line asserted. The cros_ec IRQ handler then returns IRQ_HANDLED and the resulting flood of interrupts causes the machine to hang. Since the EC interrupt is currently only used for the keyboard, move the setup and handling of the EC interrupt to the cros_ec_keyb driver. Signed-off-by: Andrew Bresticker <abrestic@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Bill Richardson authored
When communicating with the EC, the cmd_xfer() function should return the number of bytes it received from the EC, or negative on error. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Bill Richardson authored
Just because the host was able to talk to the EC doesn't mean that the EC was happy with what it was told. Errors in communincation are not the same as error messages from the EC itself. This change lets the EC report its errors separately. [dianders: Added common function to cros_ec.c] Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Bill Richardson authored
Remove the three wrapper functions that talk to the EC without passing all the desired arguments and just use the underlying communication function that passes everything in a struct intead. This is internal code refactoring only. Nothing should change. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Bill Richardson authored
struct cros_ec_device has a superfluous "name" field. We can get all the debugging info we need from the existing ec_name and phys_name fields, so let's take out the extra field. The printout also has sufficient info in it without explicitly adding the transport. Before this change: cros-ec-spi spi2.0: Chrome EC (SPI) After this change: cros-ec-spi spi2.0: Chrome EC device registered Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Bill Richardson authored
This is some internal structure reorganization / renaming to prepare for future patches that will add a userspace API to cros_ec. There should be no visible changes. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Simon Glass authored
Some commands take a while to execute. Use -EAGAIN to signal this to the caller. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Bill Richardson authored
The members of struct cros_ec_device were improperly commented, and intermixed the private and public sections. This is just cleanup to make it more obvious what goes with what. [dianders: left lock in the structure but gave it the name that will eventually be used.] Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Bill Richardson authored
The lower-level driver may want to provide its own buffers. If so, there's no need to allocate new ones. This already happens to work just fine (since we check for size of 0 and use devm allocation), but it's good to document it. [dianders: Resolved conflicts; documented that no code changes needed on mainline] Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Bill Richardson authored
This comment was incorrect, so update it. Signed-off-by: Bill Richardson <wfrichar@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
If platform_device_alloc() or platform_device_add_data() fail during pcf50633_probe(), the current code ignores the return error code and continues to attempt to allocate new platform devices for each of the supported regulators. Instead, if any failures occur we should fail out gracefully by cleaning up after ourselves and return the error. Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Rickard Strandqvist authored
Remove variable that are never used This was found using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Chanwoo Choi authored
This patch use regulator_suspend_prepare() function to prepare the proper state of regulators for suspend state to remove un-necessary leakage power-consumption. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Chanwoo Choi authored
This patch add documentation for S2MPU02 PMIC device. S2MPU02 has a little difference from S2MPS11/S2MPS14 PMIC and has LDO[1-28]/Buck[1-7]. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Chanwoo Choi authored
This patch add S2MPU02 regulator device to existing S2MPS11 device driver because of little difference between S2MPS1x and S2MPU02. The S2MPU02 regulator device includes LDO[1-28] and BUCK[1-7]. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> [Add missing linear_min_sel of S2MPU02 LDO regulators by Jonghwa Lee] Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Mark Brown <broonie@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Chanwoo Choi authored
Add support for Samsung S2MPU02 PMIC device to the MFD sec-core driver. The S2MPU02 device includes PMIC/RTC/Clock devices. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Alexander Shiyan authored
This patch convert mc13xxx MFD driver to use regmap irq framework for interrupt registration. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Sachin Kamat authored
‘irq_bit’ is unused in the function. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Charles Keepax authored
To avoid someone attempting to change this regulator_get back into a devm_regulator_get put a comment in explaining that devres can't be used here as the regulator will be destroyed before devres calls regulator_put. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Andreas Färber authored
It's LDO2, not LD02. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Sachin Kamat <sachin.kamat@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Andreas Färber authored
It's <1>, not 1. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Sachin Kamat <sachin.kamat@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Charles Keepax authored
Ever since this commit: commit d4807ad2 regmap: Check readable regs in _regmap_read Regmap will refuse to read a register which is not marked as readable, this has highlighted a number of controls in this driver which are not marked as readable/missing defaults. This patch corrects the situation, by adding the missing readables/defaults. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Prathyush K authored
Set the device as wakeup capable and register the wakeup source. Note: Though it makes more sense to have the SPI framework do this, (either via device tree or by board_info) this change is as per an existing mail chain: https://lkml.org/lkml/2009/8/27/291Signed-off-by: Prathyush K <prathyush.k@samsung.com> Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Laxman Dewangan authored
The macro name for enable3 pin is named as AS3722_EXT_CONTROL_PIN_ENABLE2 which is conflict with the enable2 pin. Correct this macro name to correctly reflect the enable pin i.e. AS3722_EXT_CONTROL_PIN_ENABLE3. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reported-by: Dan Willemsen <dwillemsen@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-
Charles Keepax authored
There are no Arizona devices with 3 core supplies but we define a fix array with space for 3 core supplies. Lower the ARIZONA_MAX_CORE_SUPPLIES define to 2, to save a few bytes. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-