[RESEND PATCH] hid: Drop owner assignment from i2c_driver

2015-11-18 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> Acked-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com> --- The coccinelle script which generated the patch was sent here: http://www

Re: [PATCH v4 05/24] misc: max77693-haptic: use pwm_get_xxx() helpers where appropriate

2015-11-16 Thread Krzysztof Kozlowski
= (pwm_get_period((haptic->pwm_dev)) + haptic->pwm_duty) / 2; Double parentheses over argument are not needed so just: pwm_get_period(haptic->pwm_dev) + ... Beside that patch looks good, so with removing parentheses here and below: Reviewed-by: Krzysztof Kozlowski

Re: [PATCH v2] HID: hiddev: change hiddev_connect() to return bool

2015-10-19 Thread Krzysztof Kozlowski
On 20.10.2015 00:11, Luis de Bethencourt wrote: > On 13/10/15 02:49, Krzysztof Kozlowski wrote: >> 2015-10-09 22:00 GMT+09:00 Luis de Bethencourt <lui...@osg.samsung.com>: >>> Since hid_connect() only cares about hiddev_connect() succeeding or >>> failing, t

Re: [PATCH v2] HID: hiddev: change hiddev_connect() to return bool

2015-10-12 Thread Krzysztof Kozlowski
2015-10-09 22:00 GMT+09:00 Luis de Bethencourt : > Since hid_connect() only cares about hiddev_connect() succeeding or > failing, there is no need for this function to return an int and it can > return a bool instead. It can return bool but it would not be in line with

Re: [PATCH 2/2] Input: mms114 - remove unneded semicolons

2015-09-14 Thread Krzysztof Kozlowski
le changed, 2 insertions(+), 2 deletions(-) Patch is obvious (actually it could go to trivial tree), so FWIW: Reviewed-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body

Re: [PATCH v2] HID: hid-input: Fix accessing freed memory during device disconnect

2015-08-02 Thread Krzysztof Kozlowski
On 03.08.2015 09:01, Krzysztof Kozlowski wrote: During unbinding the driver was dereferencing a pointer to memory already freed by power_supply_unregister(). Driver was freeing its internal description of battery through pointers stored in power_supply structure. However, because the core

[PATCH v2] HID: hid-input: Fix accessing freed memory during device disconnect

2015-08-02 Thread Krzysztof Kozlowski
power_supply_unregister() this memory is freed and the driver cannot access these members. Fix this by storing the pointer to internal description of battery in a local variable before calling power_supply_unregister(), so the pointer remains valid. Signed-off-by: Krzysztof Kozlowski k.kozlow

Re: [PATCH] HID: hid-input: Fix accessing freed memory during driver unbind

2015-08-01 Thread Krzysztof Kozlowski
2015-08-01 21:11 GMT+09:00 Jiri Kosina jkos...@suse.com: On Wed, 29 Jul 2015, Dmitry Torokhov wrote: Another and less intrusive fix would be: char *name = dev-battery-desc-name; struct power_supply_desc *psy_desc = dev-battery-desc; power_supply_unregister(dev-battery);

[PATCH v2 1/4] Input: max77693: Remove a read-only pwm_divisor field

2015-07-29 Thread Krzysztof Kozlowski
Storing a predefined PWM divisor in state container structure is meaningless. The field, after initialization, is only read so this only obfuscates the code. Remove the field and use directly enum value. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Dmitry Torokhov

[PATCH v2 4/4] Input: Remove the max77843 haptic driver

2015-07-29 Thread Krzysztof Kozlowski
The max77693 haptic driver supports Maxim 77843 device so remove the max77843 driver. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com --- drivers/input/misc/Kconfig | 12 -- drivers/input/misc/Makefile | 1

[PATCH v2 2/4] Input: max77693: Prepare for adding support for Maxim 77843

2015-07-29 Thread Krzysztof Kozlowski
Prepare the driver for supporting two devices: Maxim 77693 and 77843: 1. Add table of device ids and store current device type for later usage. 2. Differentiate the haptic device configuration. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Dmitry Torokhov dmitry.torok

Re: [PATCH] HID: hid-input: Fix accessing freed memory during driver unbind

2015-07-29 Thread Krzysztof Kozlowski
2015-07-30 2:46 GMT+09:00 Dmitry Torokhov dmitry.torok...@gmail.com: On Wed, Jul 29, 2015 at 03:07:04PM +0200, Jiri Kosina wrote: On Tue, 28 Jul 2015, Krzysztof Kozlowski wrote: During unbinding the driver was dereferencing a pointer to memory already freed by power_supply_unregister

[PATCH 1/4] Input: max77693: Remove a read-only pwm_divisor field

2015-07-29 Thread Krzysztof Kozlowski
Storing a predefined PWM divisor in state container structure is meaningless. The field, after initialization, is only read so this only obfuscates the code. Remove the field and use directly enum value. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- drivers/input/misc/max77693

[PATCH 0/4] Input: Merge max77843 haptic driver into max77693

2015-07-29 Thread Krzysztof Kozlowski
, then patchset can wait till MFD/regulator changes reach Linus' tree. Best regards, Krzysztof [0] https://lkml.org/lkml/2015/7/15/554 Krzysztof Kozlowski (4): Input: max77693: Remove a read-only pwm_divisor field Input: max77693: Prepare for adding support for Maxim 77843 Input: max77693: Add

[PATCH 3/4] Input: max77693: Add support for Maxim 77843

2015-07-29 Thread Krzysztof Kozlowski
-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- drivers/input/misc/Kconfig | 6 ++--- drivers/input/misc/max77693-haptic.c | 48 +--- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig

[PATCH 2/4] Input: max77693: Prepare for adding support for Maxim 77843

2015-07-29 Thread Krzysztof Kozlowski
Prepare the driver for supporting two devices: Maxim 77693 and 77843: 1. Add table of device ids and store current device type for later usage. 2. Differentiate the haptic device configuration. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- drivers/input/misc/max77693-haptic.c

[PATCH 4/4] Input: Remove the max77843 haptic driver

2015-07-29 Thread Krzysztof Kozlowski
The max77693 haptic driver supports Maxim 77843 device so remove the max77843 driver. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- drivers/input/misc/Kconfig | 12 -- drivers/input/misc/Makefile | 1 - drivers/input/misc/max77843-haptic.c | 359

Re: [PATCH 4/4] Input: Remove the max77843 haptic driver

2015-07-29 Thread Krzysztof Kozlowski
2015-07-29 15:31 GMT+09:00 Krzysztof Kozlowski k.kozlow...@samsung.com: The max77693 haptic driver supports Maxim 77843 device so remove the max77843 driver. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Crap, wrong signed-off-by. I'll respin. Best regards, Krzysztof

Re: [PATCH 0/4] Input: Merge max77843 haptic driver into max77693

2015-07-29 Thread Krzysztof Kozlowski
2015-07-30 2:08 GMT+09:00 Dmitry Torokhov dmitry.torok...@gmail.com: On Wed, Jul 29, 2015 at 03:31:26PM +0900, Krzysztof Kozlowski wrote: Hi, Description === The Maxim 77843 haptic driver differs from 77693 by: 1. Setting the bias. 2. Different configuration register. 3

Re: Bad change in commit 297d716f6260cc9421d971b124ca196b957ee458?

2015-07-27 Thread Krzysztof Kozlowski
On 27.07.2015 22:10, H.J. Lu wrote: Hi, This commit: commit 297d716f6260cc9421d971b124ca196b957ee458 Author: Krzysztof Kozlowski k.kozlow...@samsung.com Date: Thu Mar 12 08:44:11 2015 +0100 power_supply: Change ownership from driver to core Change the ownership

[PATCH v5 9/9] regulator: Remove the max77843 driver

2015-07-15 Thread Krzysztof Kozlowski
The max77693 regulator driver supports Maxim 77843 device so remove the max77843 driver. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- drivers/regulator/Kconfig| 8 -- drivers/regulator/Makefile | 1 - drivers/regulator/max77843.c | 203

[PATCH v5 0/9] regulator: Merge max77843 into max77693

2015-07-15 Thread Krzysztof Kozlowski
but next patches depend on previous ones. So probably the easiest way would be picking picked up by one maintainer. Best regards, Krzysztof Krzysztof Kozlowski (9): mfd/extcon: max77693: Remove unused extern declarations and max77693_dev members mfd: max77693: Store I2C device type as enum

[PATCH v5 4/9] drivers: max77693: Move state container to common header

2015-07-15 Thread Krzysztof Kozlowski
-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Sebastian Reichel s...@kernel.org Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org Acked-by: Chanwoo Choi cw00.c...@samsung.com Acked-by: Jacek Anaszewski j.anaszew...@samsung.com --- drivers/extcon

[PATCH v5 3/9] regulator: max77693: Support different register configurations

2015-07-15 Thread Krzysztof Kozlowski
Add support for different configurations of charger's registers so the same driver could be used on other devices (e.g. MAX77843). Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Mark Brown broo...@kernel.org --- drivers/regulator/max77693.c | 39

[PATCH v5 7/9] mfd/extcon: max77843: Rename defines to allow inclusion with max77693

2015-07-15 Thread Krzysztof Kozlowski
Add MAX77843_MUIC prefix to some of the defines used in max77843 extcon driver so the max77693-private.h can be included simultaneously with max77843-private.h. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org Acked-by: Chanwoo Choi cw00.c

[PATCH v5 2/9] mfd: max77693: Store I2C device type as enum and add default unknown

2015-07-15 Thread Krzysztof Kozlowski
Store the device type (obtained from i2c_device_id) as an enum and add a default type of unknown to distinguish from case when this is not set at all. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org --- include/linux/mfd/max77693-private.h | 11

[PATCH v5 1/9] mfd/extcon: max77693: Remove unused extern declarations and max77693_dev members

2015-07-15 Thread Krzysztof Kozlowski
Clean up the max77693 private header file by removing: 1. Left-overs from previous way of interrupt handling (driver uses regmap_irq_chip). 2. Unused members of struct 'max77693_dev' related to interrupts in extcon driver. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked

[PATCH v5 5/9] drivers: max77843: Switch to common max77693 state container

2015-07-15 Thread Krzysztof Kozlowski
Switch to the same definition of state container as in MAX77693 drivers. This will allow usage of one regulator driver in both devices: MAX77693 and MAX77843. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com Acked-by: Lee Jones lee.jo

[PATCH v4 4/9] drivers: max77693: Move state container to common header

2015-07-13 Thread Krzysztof Kozlowski
-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Sebastian Reichel s...@kernel.org Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org Acked-by: Chanwoo Choi cw00.c...@samsung.com --- drivers/extcon/extcon-max77693.c | 3 ++- drivers/input/misc

[PATCH v4 3/9] regulator: max77693: Support different register configurations

2015-07-13 Thread Krzysztof Kozlowski
Add support for different configurations of charger's registers so the same driver could be used on other devices (e.g. MAX77843). Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Mark Brown broo...@kernel.org --- drivers/regulator/max77693.c | 39

[PATCH v4 6/9] mfd/extcon: max77693: Rename defines to allow inclusion with max77843

2015-07-13 Thread Krzysztof Kozlowski
Add MAX77693 prefix to some of the defines used in max77693 extcon driver so the max77693-private.h can be included simultaneously with max77843-private.h. Additionally use BIT() macro in header. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org

[PATCH v4 9/9] regulator: Remove the max77843 driver

2015-07-13 Thread Krzysztof Kozlowski
The max77693 regulator driver supports Maxim 77843 device so remove the max77843 driver. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- drivers/regulator/Kconfig| 8 -- drivers/regulator/Makefile | 1 - drivers/regulator/max77843.c | 203

[PATCH v4 0/9] regulator: Merge max77843 into max77693

2015-07-13 Thread Krzysztof Kozlowski
picked up by one maintainer. Best regards, Krzysztof Krzysztof Kozlowski (9): mfd/extcon: max77693: Remove unused extern declarations and max77693_dev members mfd: max77693: Store I2C device type as enum and add default unknown regulator: max77693: Support different register

[PATCH] input: Drop owner assignment from i2c_driver

2015-07-10 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- The coccinelle script which generated the patch was sent here: http://www.spinics.net/lists/kernel/msg2029903.html --- drivers/input/keyboard

[PATCH] hid: Drop owner assignment from i2c_driver

2015-07-09 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- The coccinelle script which generated the patch was sent here: http://www.spinics.net/lists/kernel/msg2029903.html --- drivers/hid/i2c-hid/i2c

[PATCH v3 1/9] mfd/extcon: max77693: Remove unused extern declarations and max77693_dev members

2015-07-08 Thread Krzysztof Kozlowski
Clean up the max77693 private header file by removing: 1. Left-overs from previous way of interrupt handling (driver uses regmap_irq_chip). 2. Unused members of struct 'max77693_dev' related to interrupts in extcon driver. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked

[PATCH v3 4/9] extcon/input/mfd/power/regulator: max77693: Move state container to common header

2015-07-08 Thread Krzysztof Kozlowski
-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Sebastian Reichel s...@kernel.org Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org Acked-by: Chanwoo Choi cw00.c...@samsung.com --- drivers/extcon/extcon-max77693.c | 3 ++- drivers/input/misc

[PATCH v3 3/9] regulator: max77693: Support different register configurations

2015-07-08 Thread Krzysztof Kozlowski
Add support for different configurations of charger's registers so the same driver could be used on other devices (e.g. MAX77843). Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Mark Brown broo...@kernel.org --- drivers/regulator/max77693.c | 39

[PATCH v3 0/9] regulator: Merge max77843 into max77693

2015-07-08 Thread Krzysztof Kozlowski
on previous ones. So probably the easiest way would be picking picked up by one maintainer. Best regards, Krzysztof Krzysztof Kozlowski (9): mfd/extcon: max77693: Remove unused extern declarations and max77693_dev members mfd: max77693: Store I2C device type as enum and add default unknown

[PATCH v3 7/9] mfd/extcon: max77843: Rename defines to allow inclusion with max77693

2015-07-08 Thread Krzysztof Kozlowski
Add MAX77843_MUIC prefix to some of the defines used in max77843 extcon driver so the max77693-private.h can be included simultaneously with max77843-private.h. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org Acked-by: Chanwoo Choi cw00.c

[PATCH v3 9/9] regulator: Remove the max77843 driver

2015-07-08 Thread Krzysztof Kozlowski
The max77693 regulator driver supports Maxim 77843 device so remove the max77843 driver. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- drivers/regulator/Kconfig| 8 -- drivers/regulator/Makefile | 1 - drivers/regulator/max77843.c | 203

[PATCH v3 5/9] extcon/input/mfd/regulator: max77843: Switch to common max77693 state container

2015-07-08 Thread Krzysztof Kozlowski
Switch to the same definition of state container as in MAX77693 drivers. This will allow usage of one regulator driver in both devices: MAX77693 and MAX77843. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com Acked-by: Lee Jones lee.jo

[PATCH v3 8/9] regulator: max77693: Add support for MAX77843 device

2015-07-08 Thread Krzysztof Kozlowski
The charger and safeout part of MAX77843 is almost the same as MAX77693. From regulator point of view the only differences are the constraints and register values related to these constraints. Now the max77693 regulator driver can be used for MAX77843. Signed-off-by: Krzysztof Kozlowski

[PATCH v3 6/9] mfd/extcon: max77693: Rename defines to allow inclusion with max77843

2015-07-08 Thread Krzysztof Kozlowski
Add MAX77693 prefix to some of the defines used in max77693 extcon driver so the max77693-private.h can be included simultaneously with max77843-private.h. Additionally use BIT() macro in header. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org

[PATCH v3 2/9] mfd: max77693: Store I2C device type as enum and add default unknown

2015-07-08 Thread Krzysztof Kozlowski
Store the device type (obtained from i2c_device_id) as an enum and add a default type of unknown to distinguish from case when this is not set at all. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org --- include/linux/mfd/max77693-private.h | 11

[PATCH v2 9/9] regulator: Remove the max77843 driver

2015-05-23 Thread Krzysztof Kozlowski
The max77693 regulator driver supports Maxim 77843 device so remove the max77843 driver. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- drivers/regulator/Kconfig| 8 -- drivers/regulator/Makefile | 1 - drivers/regulator/max77843.c | 203

[PATCH v2 8/9] regulator: max77693: Add support for MAX77843 device

2015-05-23 Thread Krzysztof Kozlowski
The charger and safeout part of MAX77843 is almost the same as MAX77693. From regulator point of view the only differences are the constraints and register values related to these constraints. Now the max77693 regulator driver can be used for MAX77843. Signed-off-by: Krzysztof Kozlowski

[PATCH v2 5/9] extcon/input/mfd/regulator: max77843: Switch to common max77693 state container

2015-05-23 Thread Krzysztof Kozlowski
Switch to the same definition of state container as in MAX77693 drivers. This will allow usage of one regulator driver in both devices: MAX77693 and MAX77843. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- drivers/extcon/extcon-max77843.c | 17 + drivers/input

[PATCH v2 7/9] mfd/extcon: max77843: Rename defines to allow inclusion with max77693

2015-05-23 Thread Krzysztof Kozlowski
Add MAX77843_MUIC prefix to some of the defines used in max77843 extcon driver so the max77693-private.h can be included simultaneously with max77843-private.h. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Lee Jones lee.jo...@linaro.org --- drivers/extcon/extcon-max77843

[PATCH v2 4/9] extcon/input/mfd/power/regulator: max77693: Move state container to common header

2015-05-23 Thread Krzysztof Kozlowski
-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Sebastian Reichel s...@kernel.org --- drivers/extcon/extcon-max77693.c | 3 ++- drivers/input/misc/max77693-haptic.c | 1 + drivers/mfd/max77693.c | 31 + drivers/power/max77693_charger.c | 1

[PATCH v2 1/9] mfd/extcon: max77693: Remove unused extern declarations and max77693_dev members

2015-05-23 Thread Krzysztof Kozlowski
Clean up the max77693 private header file by removing: 1. Left-overs from previous way of interrupt handling (driver uses regmap_irq_chip). 2. Unused members of struct 'max77693_dev' related to interrupts in extcon driver. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com

[PATCH v2 2/9] mfd: max77693: Store I2C device type as enum and add default unknown

2015-05-23 Thread Krzysztof Kozlowski
Store the device type (obtained from i2c_device_id) as an enum and add a default type of unknown to distinguish from case when this is not set at all. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- include/linux/mfd/max77693-private.h | 11 ++- 1 file changed, 6

[PATCH v2 3/9] regulator: max77693: Support different register configurations

2015-05-23 Thread Krzysztof Kozlowski
Add support for different configurations of charger's registers so the same driver could be used on other devices (e.g. MAX77843). Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com Acked-by: Mark Brown broo...@kernel.org --- drivers/regulator/max77693.c | 39

[PATCH v2 6/9] mfd/extcon: max77693: Rename defines to allow inclusion with max77843

2015-05-23 Thread Krzysztof Kozlowski
Add MAX77693 prefix to some of the defines used in max77693 extcon driver so the max77693-private.h can be included simultaneously with max77843-private.h. Additionally use BIT() macro in header. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- drivers/extcon/extcon-max77693.c

[PATCH 06/10] max77843: Switch to common max77693 state container

2015-04-29 Thread Krzysztof Kozlowski
Switch to the same definition of state container as in MAX77693 drivers. This will allow usage of one regulator driver in both devices: MAX77693 and MAX77843. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- drivers/extcon/extcon-max77843.c | 17 + drivers/input

Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver

2015-03-26 Thread Krzysztof Kozlowski
2015-03-25 1:39 GMT+01:00 Beomho Seo beomho@samsung.com: Then, Can I request merge this patch ? Yes, but it is not up to me :). -- To unsubscribe from this list: send the line unsubscribe linux-input in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver

2015-03-24 Thread Krzysztof Kozlowski
2015-03-24 9:01 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/10/2015 10:44 PM, Beomho Seo wrote: On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote: On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho

Re: [PATCH v7 3/5] power: max77843_battery: Add Max77843 fuel gauge device driver

2015-03-24 Thread Krzysztof Kozlowski
2015-03-24 9:02 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/10/2015 10:44 PM, Beomho Seo wrote: On 03/09/2015 07:01 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:36 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:14 AM, Sebastian Reichel wrote: Hi, On Mon, Mar 02, 2015

Re: power_supply: Change ownership from driver to core

2015-03-23 Thread Krzysztof Kozlowski
On pon, 2015-03-23 at 17:54 +0300, Dan Carpenter wrote: Hello Krzysztof Kozlowski, The patch 297d716f6260: power_supply: Change ownership from driver to core from Mar 12, 2015, leads to the following static checker warning: drivers/hid/hid-input.c:457 hidinput_setup_battery

[PATCH] HID: input: Fix NULL pointer dereference when power_supply_register fails

2015-03-23 Thread Krzysztof Kozlowski
Do not call power_supply_powers() if power_supply_register() failed earlier. This fixes possible NULL pointer dereference by power_supply_powers() in such case. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reported-by: Dan Carpenter dan.carpen...@oracle.com --- The patch

Re: [RESEND PATCH v6 00/22] power_supply: Allow safe usage of power supply

2015-03-13 Thread Krzysztof Kozlowski
On czw, 2015-03-12 at 08:43 +0100, Krzysztof Kozlowski wrote: Hi, Resending patchset because it was filtered out by vger.kernel.org. The patchset fixes invalid memory accesses in certain race scenarios by moving ownership of struct power_supply to the core. All drivers are modified. Hi

[RESEND PATCH v6 09/22] mfd: ab8500: Use power_supply_*() API for accessing function attrs

2015-03-12 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property - power_supply_get_property Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked

[RESEND PATCH v6 06/22] power_supply: sysfs: Use power_supply_*() API for accessing function attrs

2015-03-12 Thread Krzysztof Kozlowski
- power_supply_property_is_writeable Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Jonghwa Lee jonghwa3@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

[RESEND PATCH v6 02/22] compal-laptop: Check return value of power_supply_register

2015-03-12 Thread Krzysztof Kozlowski
power_supply_unregister() unconditionally cleans up given power supply. Fix this by checking return status of power_supply_register() call. In case of failure, clean up sysfs entries and fail the probe. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Fixes: 9be0fcb5ed46 (compal-laptop: add JHL90, battery

[RESEND PATCH v6 18/22] x86/olpc/xo15/sci: Use newly added power_supply_put API

2015-03-12 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

[RESEND PATCH v6 03/22] power_supply: Add driver private data

2015-03-12 Thread Krzysztof Kozlowski
, for example: struct some_driver_info { struct i2c_client *client; struct power_supply *power_supply; ... } In such case one cannot use container_of() and must store pointer to state container as private data. Signed-off-by: Krzysztof Kozlowski k.kozlow

[RESEND PATCH v6 22/22] arm: mach-pxa: Decrement the power supply's device reference counter

2015-03-12 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org Acked-by: Robert Jarzmik robert.jarz

Re: [PATCH v6 13/22] HID: Change power supply ownership from driver to core

2015-03-12 Thread Krzysztof Kozlowski
On śro, 2015-03-11 at 19:46 +0100, Sebastian Reichel wrote: Hi Jiri, On Wed, Mar 11, 2015 at 12:08:09PM -0400, Jiri Kosina wrote: On Tue, 10 Mar 2015, Sebastian Reichel wrote: On Tue, Mar 10, 2015 at 09:27:17AM +0100, Krzysztof Kozlowski wrote: Change the ownership of power_supply

[RESEND PATCH v6 10/22] power_supply: apm_power: Use power_supply_*() API for accessing function attrs

2015-03-12 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property - power_supply_get_property Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked

[RESEND PATCH v6 17/22] x86/olpc/xo1/sci: Use newly added power_supply_put API

2015-03-12 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

[RESEND PATCH v6 19/22] power_supply: 88pm860x_charger: Decrement the power supply's device reference counter

2015-03-12 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

[RESEND PATCH v6 16/22] power_supply: charger-manager: Decrement the power supply's device reference counter

2015-03-12 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

[RESEND PATCH v6 07/22] power_supply: 88pm860x_charger: Use power_supply_*() API for accessing function attrs

2015-03-12 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property - power_supply_get_property - set_property - power_supply_set_property Signed-off-by: Krzysztof

[RESEND PATCH v6 15/22] power_supply: Increment power supply use counter when obtaining references

2015-03-12 Thread Krzysztof Kozlowski
of power_supply_get_property-like functions even when driver unregisters this power supply. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com --- drivers/power/power_supply_core.c | 17 +++-- 1 file changed, 15 insertions

[RESEND PATCH v6 11/22] power_supply: bq2415x_charger: Use power_supply_*() API for accessing function attrs

2015-03-12 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property - power_supply_get_property Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked

[RESEND PATCH v6 20/22] power_supply: bq2415x_charger: Decrement the power supply's device reference counter

2015-03-12 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter (increased by power_supply_get_by_name() or power_supply_get_by_phandle()). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz

[RESEND PATCH v6 12/22] power_supply: charger-manager: Use power_supply_*() API for accessing function attrs

2015-03-12 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property - power_supply_get_property Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked

Re: [RESEND PATCH v6 09/22] mfd: ab8500: Use power_supply_*() API for accessing function attrs

2015-03-12 Thread Krzysztof Kozlowski
On czw, 2015-03-12 at 09:01 +, Lee Jones wrote: On Thu, 12 Mar 2015, Krzysztof Kozlowski wrote: Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace

Re: [RESEND PATCH v6 09/22] mfd: ab8500: Use power_supply_*() API for accessing function attrs

2015-03-12 Thread Krzysztof Kozlowski
On czw, 2015-03-12 at 09:50 +, Lee Jones wrote: On Thu, 12 Mar 2015, Krzysztof Kozlowski wrote: On czw, 2015-03-12 at 09:01 +, Lee Jones wrote: On Thu, 12 Mar 2015, Krzysztof Kozlowski wrote: Replace direct calls to power supply function attributes with wrappers. Wrappers

Re: [PATCH v6 00/22] power_supply: Allow safe usage of power supply

2015-03-11 Thread Krzysztof Kozlowski
On wto, 2015-03-10 at 09:27 +0100, Krzysztof Kozlowski wrote: Hi, The patchset fixes invalid memory accesses in certain race scenarios by moving ownership of struct power_supply to the core. All drivers are modified. TLDR for driver and subsystem maintainers

[PATCH v6 15/22] power_supply: Increment power supply use counter when obtaining references

2015-03-10 Thread Krzysztof Kozlowski
of power_supply_get_property-like functions even when driver unregisters this power supply. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com --- drivers/power/power_supply_core.c | 17 +++-- 1 file changed, 15 insertions

[PATCH v6 21/22] mfd: ab8500: Decrement the power supply's device reference counter

2015-03-10 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Acked-by: Linus Walleij linus.wall...@linaro.org Acked-by: Lee Jones lee.jo...@linaro.org Reviewed-by: Bartlomiej

[PATCH v6 19/22] power_supply: 88pm860x_charger: Decrement the power supply's device reference counter

2015-03-10 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

[PATCH v6 16/22] power_supply: charger-manager: Decrement the power supply's device reference counter

2015-03-10 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

[PATCH v6 22/22] arm: mach-pxa: Decrement the power supply's device reference counter

2015-03-10 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org Acked-by: Robert Jarzmik robert.jarz

[PATCH v6 17/22] x86/olpc/xo1/sci: Use newly added power_supply_put API

2015-03-10 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

[PATCH v6 09/22] mfd: ab8500: Use power_supply_*() API for accessing function attrs

2015-03-10 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property - power_supply_get_property Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked

[PATCH v6 14/22] power_supply: Add power_supply_put for decrementing device reference counter

2015-03-10 Thread Krzysztof Kozlowski
power_supply_put() for decrementing the reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- drivers/power/power_supply_core.c | 38

[PATCH v6 06/22] power_supply: sysfs: Use power_supply_*() API for accessing function attrs

2015-03-10 Thread Krzysztof Kozlowski
- power_supply_property_is_writeable Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Jonghwa Lee jonghwa3@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

[PATCH v6 05/22] power_supply: Add API for safe access of power supply function attrs

2015-03-10 Thread Krzysztof Kozlowski
is still needed to fully fix race conditions in accessing freed power supply. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org Acked-by: Pavel Machek pa...@ucw.cz --- drivers

[PATCH v6 04/22] power_supply: Move run-time configuration to separate structure

2015-03-10 Thread Krzysztof Kozlowski
then it should allocate config on stack and initialize it with proper values. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz [for the nvec part] Reviewed-by: Marc Dietrich marvi...@gmx.de

[PATCH v6 00/22] power_supply: Allow safe usage of power supply

2015-03-10 Thread Krzysztof Kozlowski
/1/21/471 [2] https://lkml.org/lkml/2015/2/20/150 Best regards, Krzysztof Krzysztof Kozlowski (22): compal-laptop: Fix leaking hwmon device compal-laptop: Check return value of power_supply_register power_supply: Add driver private data power_supply: Move run-time configuration

[PATCH v6 20/22] power_supply: bq2415x_charger: Decrement the power supply's device reference counter

2015-03-10 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter (increased by power_supply_get_by_name() or power_supply_get_by_phandle()). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz

[PATCH v6 18/22] x86/olpc/xo15/sci: Use newly added power_supply_put API

2015-03-10 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

[PATCH v6 12/22] power_supply: charger-manager: Use power_supply_*() API for accessing function attrs

2015-03-10 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property - power_supply_get_property Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked

[PATCH v6 10/22] power_supply: apm_power: Use power_supply_*() API for accessing function attrs

2015-03-10 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property - power_supply_get_property Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked

[PATCH v6 02/22] compal-laptop: Check return value of power_supply_register

2015-03-10 Thread Krzysztof Kozlowski
power_supply_unregister() unconditionally cleans up given power supply. Fix this by checking return status of power_supply_register() call. In case of failure, clean up sysfs entries and fail the probe. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Fixes: 9be0fcb5ed46 (compal-laptop: add JHL90, battery

[PATCH v6 07/22] power_supply: 88pm860x_charger: Use power_supply_*() API for accessing function attrs

2015-03-10 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property - power_supply_get_property - set_property - power_supply_set_property Signed-off-by: Krzysztof

[PATCH v6 11/22] power_supply: bq2415x_charger: Use power_supply_*() API for accessing function attrs

2015-03-10 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property - power_supply_get_property Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked

Re: [PATCH v7 2/5] power: max77843_charger: Add Max77843 charger device driver

2015-03-09 Thread Krzysztof Kozlowski
On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote: On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote: 2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com: On 03/08/2015 05:13 AM, Sebastian Reichel wrote: On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote: From: Beomho

  1   2   >