Re: [PATCH v15 1/2] leds: core: Introduce LED pattern trigger

2018-10-11 Thread Baolin Wang
Hi, On 12 October 2018 at 04:07, Jacek Anaszewski wrote: > Hi Baolin, > > On 10/11/2018 06:07 AM, Baolin Wang wrote: >> This patch adds a new led trigger that LED device can employ >> software or hardware pattern engine. >> >> Consumers can write 'patter

Re: [PATCH v3 2/4] power: supply: core: Introduce properties to present the battery OCV capacity table

2018-10-13 Thread Baolin Wang
Hi Rob, On 12 October 2018 at 22:35, Rob Herring wrote: > On Thu, Sep 27, 2018 at 03:26:55PM +0800, Baolin Wang wrote: >> Some battery driver will use the open circuit voltage (OCV) value to look >> up the corresponding battery capacity percent in one certain degree Celsius. >

[PATCH v4 3/6] dt-bindings: power: Introduce properties to present the battery OCV capacity table

2018-10-15 Thread Baolin Wang
Reichel Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v3: - Split binding into one separate patch. - Rename ocv-capacity-table-temperatures to ocv-capacity-celsius. - Add some words to specify the OCV's unit. Changes from v2: - Use type __be32 to calculate the

[PATCH v4 2/6] power: supply: core: Add one field to present the battery internal resistance

2018-10-15 Thread Baolin Wang
Add one field for 'struct power_supply_battery_info' to present the battery factory internal resistance. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v3: - New patch in v3, which splits code into one separate patch. - Add Linusw reviewed tag. --- dri

[PATCH v4 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-10-15 Thread Baolin Wang
factory internal resistance for battery information. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v3: - Split binding into one separate patch. - Add LinusW reviewed tag. Changes from v2: - Rename the property. - Improve the commit message. Changes from v1: - New

[PATCH v4 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-10-15 Thread Baolin Wang
We have introduced some battery properties to present the OCV table temperatures and OCV capacity table values. Thus this patch add OCV temperature and OCV table for battery information, as well as providing some helper functions to use the OCV capacity table for users. Signed-off-by: Baolin Wang

[PATCH v4 5/6] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation

2018-10-15 Thread Baolin Wang
This patch adds the binding documentation for Spreadtrum SC27XX series PMICs fuel gauge unit device, which is used to calculate the battery capacity. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring --- Changes from v3: Add reviewed tag from Rob. Changes from v2

[PATCH v4 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-10-15 Thread Baolin Wang
This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, which is used to calculate the battery capacity. Original-by: Yuanjiang Yu Signed-off-by: Baolin Wang Acked-by: Linus Walleij --- Changes from v3: - None. Changes from v2: - Use core helper functions to look up OCV

Re: [PATCH v6 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-11-01 Thread Baolin Wang
t; temperatures and OCV capacity table values. Thus this patch add OCV >> temperature and OCV table for battery information, as well as providing >> some helper functions to use the OCV capacity table for users. >> >> Signed-off-by: Baolin Wang >> Reviewed-by: Linus W

Re: [PATCH v6 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-11-01 Thread Baolin Wang
Hi Quentin, On 1 November 2018 at 21:50, Quentin Schulz wrote: > Hi Baolin, > > On Thu, Nov 01, 2018 at 03:22:18PM +0800, Baolin Wang wrote: >> Hi Quentin, >> >> On 29 October 2018 at 22:48, Quentin Schulz >> wrote: > [...] >> > >> >

[PATCH v7 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-11-04 Thread Baolin Wang
We have introduced some battery properties to present the OCV table temperatures and OCV capacity table values. Thus this patch add OCV temperature and OCV table for battery information, as well as providing some helper functions to use the OCV capacity table for users. Signed-off-by: Baolin Wang

[PATCH v7 5/6] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation

2018-11-04 Thread Baolin Wang
This patch adds the binding documentation for Spreadtrum SC27XX series PMICs fuel gauge unit device, which is used to calculate the battery capacity. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring --- Changes from v6: - None. Changes from v5: - None. Changes

[PATCH v7 3/6] dt-bindings: power: Introduce properties to present the battery OCV capacity table

2018-11-04 Thread Baolin Wang
Reichel Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring --- Changes from v6: - Add reviewed tag from Rob. Changes from v5: - None. Changes from v4: - Improve the description of ocv-capacity-table-n to make the order clear. Changes from v3: - Split binding into

[PATCH v7 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-11-04 Thread Baolin Wang
factory internal resistance for battery information. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v6: - None. Changes from v5: - None. Changes from v4: - None. Changes from v3: - Split binding into one separate patch. - Add LinusW reviewed tag. Changes from v2

[PATCH v7 2/6] power: supply: core: Add one field to present the battery internal resistance

2018-11-04 Thread Baolin Wang
Add one field for 'struct power_supply_battery_info' to present the battery factory internal resistance. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v6: - None. Changes from v5: - None. Changes from v4: - None. Changes from v3: - New patch in v3, wh

[PATCH v7 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-11-04 Thread Baolin Wang
This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, which is used to calculate the battery capacity. Original-by: Yuanjiang Yu Signed-off-by: Baolin Wang Acked-by: Linus Walleij --- Changes from v6: - Use DIV_ROUND_CLOSEST macro to simplify code. Changes from v5: - Save

Re: [PATCH 5/5] rtc: sc27xx: Always read normal alarm when registering RTC device

2018-10-24 Thread Baolin Wang
Hi Alexandre, On 25 October 2018 at 08:34, Alexandre Belloni wrote: > Hello, > > On 18/10/2018 16:52:30+0800, Baolin Wang wrote: >> When registering one RTC device, it will check to see if there is an >> alarm already set in RTC hardware by reading RTC alarm, at this tim

Re: [PATCH v6 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-10-24 Thread Baolin Wang
Hi Sebastian, On 22 October 2018 at 15:43, Baolin Wang wrote: > The internal resistance of a battery is not a constant in its life cycle, > this varies over the age of the battery or temperature and so on. But we > just want use one constant battery internal resistance to estimate the

Re: [PATCH v6 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-10-25 Thread Baolin Wang
On 26 October 2018 at 04:13, Sebastian Reichel wrote: > Hi Baolin, > > On Thu, Oct 25, 2018 at 10:01:55AM +0800, Baolin Wang wrote: >> Hi Sebastian, >> >> On 22 October 2018 at 15:43, Baolin Wang wrote: >> > The internal resistance of a battery is not a c

Re: More checks for patterns? was: Fix pattern handling optimalization

2018-10-26 Thread Baolin Wang
L; > + goto out; > + } > + > if (ccount != 2) { > data->npatterns = 0; > err = -EINVAL; > > > > > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) > http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- Baolin Wang Best Regards

[PATCH 0/5] Fix some issues for RTC alarm function

2018-10-18 Thread Baolin Wang
This patch set fixes some issues when setting one RTC alarm. Baolin Wang (5): rtc: sc27xx: Set wakeup capability before registering rtc device rtc: sc27xx: Clear SPG value update interrupt status rtc: sc27xx: Remove interrupts disable and clear in probe() rtc: sc27xx: Add check to see if

[PATCH 4/5] rtc: sc27xx: Add check to see if need to enable the alarm interrupt

2018-10-18 Thread Baolin Wang
The RTC interrupt enable register is not put in always-power-on region supplied by VDDRTC, so we should check if we need enable the alarm interrupt when system booting. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27xx.c | 33 + 1 file changed, 33

[PATCH 2/5] rtc: sc27xx: Clear SPG value update interrupt status

2018-10-18 Thread Baolin Wang
We should clear the SPG value update interrupt status once the SPG value is updated successfully, in case incorrect status validation for next time. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27xx.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc

[PATCH 5/5] rtc: sc27xx: Always read normal alarm when registering RTC device

2018-10-18 Thread Baolin Wang
When registering one RTC device, it will check to see if there is an alarm already set in RTC hardware by reading RTC alarm, at this time we should always read the normal alarm put in always-on region by checking the rtc->registered flag. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27x

[PATCH 1/5] rtc: sc27xx: Set wakeup capability before registering rtc device

2018-10-18 Thread Baolin Wang
Set wakeup capability before registering rtc device, in case the alarmtimer can find one available rtc device. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27xx.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c

[PATCH 3/5] rtc: sc27xx: Remove interrupts disable and clear in probe()

2018-10-18 Thread Baolin Wang
When registering one rtc device, it will check to see if there is an alarm already set in rtc hardware by issuing __rtc_read_alarm(). So we should not disable the RTC interrupts and clear the interrupts status in probe() function. Signed-off-by: Baolin Wang --- drivers/rtc/rtc-sc27xx.c | 20

Re: [PATCH 0/7] Add some fixes and new feature for SPRD DMA

2018-10-18 Thread Baolin Wang
Hi Vinod, On 29 September 2018 at 13:48, Baolin Wang wrote: > This patchset removes the direction usage from struct dma_slave_config, > and add one new field to save the direction. It also fixes some issues > for link-list transfer. Moreover this patchset adds new 2-stage transfer >

Re: [PATCH v4 3/6] dt-bindings: power: Introduce properties to present the battery OCV capacity table

2018-10-18 Thread Baolin Wang
On 19 October 2018 at 00:51, Rob Herring wrote: > On Mon, Oct 15, 2018 at 04:09:22PM +0800, Baolin Wang wrote: >> Some battery driver will use the open circuit voltage (OCV) value to look >> up the corresponding battery capacity percent in one certain degree Celsius. >> Thu

[PATCH v5 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-10-19 Thread Baolin Wang
factory internal resistance for battery information. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v4: - None. Changes from v3: - Split binding into one separate patch. - Add LinusW reviewed tag. Changes from v2: - Rename the property. - Improve the commit message

[PATCH v5 5/6] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation

2018-10-19 Thread Baolin Wang
This patch adds the binding documentation for Spreadtrum SC27XX series PMICs fuel gauge unit device, which is used to calculate the battery capacity. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring --- Changes from v4: - None. Changes from v3: - Add reviewed

[PATCH v5 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-10-19 Thread Baolin Wang
We have introduced some battery properties to present the OCV table temperatures and OCV capacity table values. Thus this patch add OCV temperature and OCV table for battery information, as well as providing some helper functions to use the OCV capacity table for users. Signed-off-by: Baolin Wang

[PATCH v5 2/6] power: supply: core: Add one field to present the battery internal resistance

2018-10-19 Thread Baolin Wang
Add one field for 'struct power_supply_battery_info' to present the battery factory internal resistance. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v4: - None. Changes from v3: - New patch in v3, which splits code into one separate patch. - Add Linus

[PATCH v5 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-10-19 Thread Baolin Wang
This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, which is used to calculate the battery capacity. Original-by: Yuanjiang Yu Signed-off-by: Baolin Wang Acked-by: Linus Walleij --- Changes from v4: - None. Changes from v3: - None. Changes from v2: - Use core helper

[PATCH v5 3/6] dt-bindings: power: Introduce properties to present the battery OCV capacity table

2018-10-19 Thread Baolin Wang
Reichel Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v4: - Improve the description of ocv-capacity-table-n to make the order clear. Changes from v3: - Split binding into one separate patch. - Rename ocv-capacity-table-temperatures to ocv-capacity-celsius. - Add some

Re: [PATCH v5 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-10-21 Thread Baolin Wang
Hi Sebastian, On 22 October 2018 at 00:52, Sebastian Reichel wrote: > Hi, > > On Fri, Oct 19, 2018 at 06:53:15PM +0800, Baolin Wang wrote: >> This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, >> which is used to calculate the battery capacity. >> &

Re: [PATCH 0/7] Add some fixes and new feature for SPRD DMA

2018-10-22 Thread Baolin Wang
On 21 October 2018 at 00:30, Vinod wrote: > On 18-10-18, 17:29, Baolin Wang wrote: >> Hi Vinod, >> >> On 29 September 2018 at 13:48, Baolin Wang wrote: >> > This patchset removes the direction usage from struct dma_slave_config, >> > and add one new fie

[PATCH v6 5/6] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation

2018-10-22 Thread Baolin Wang
This patch adds the binding documentation for Spreadtrum SC27XX series PMICs fuel gauge unit device, which is used to calculate the battery capacity. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij Reviewed-by: Rob Herring --- Changes from v5: - None. Changes from v4: - None. Changes

[PATCH v6 2/6] power: supply: core: Add one field to present the battery internal resistance

2018-10-22 Thread Baolin Wang
Add one field for 'struct power_supply_battery_info' to present the battery factory internal resistance. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v5: - None. Changes from v4: - None. Changes from v3: - New patch in v3, which splits code into one sepa

[PATCH v6 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-10-22 Thread Baolin Wang
This patch adds the Spreadtrum SC27XX serial PMICs fuel gauge support, which is used to calculate the battery capacity. Original-by: Yuanjiang Yu Signed-off-by: Baolin Wang Acked-by: Linus Walleij --- Changes from v5: - Save the OCV values in micro volts for OCV capacity table. - Use

[PATCH v6 4/6] power: supply: core: Add some helpers to use the battery OCV capacity table

2018-10-22 Thread Baolin Wang
We have introduced some battery properties to present the OCV table temperatures and OCV capacity table values. Thus this patch add OCV temperature and OCV table for battery information, as well as providing some helper functions to use the OCV capacity table for users. Signed-off-by: Baolin Wang

[PATCH v6 3/6] dt-bindings: power: Introduce properties to present the battery OCV capacity table

2018-10-22 Thread Baolin Wang
Reichel Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v5: - None. Changes from v4: - Improve the description of ocv-capacity-table-n to make the order clear. Changes from v3: - Split binding into one separate patch. - Rename ocv-capacity-table-temperatures to ocv

[PATCH v6 1/6] dt-bindings: power: Introduce one property to present the battery internal resistance

2018-10-22 Thread Baolin Wang
factory internal resistance for battery information. Signed-off-by: Baolin Wang Reviewed-by: Linus Walleij --- Changes from v5: - None. Changes from v4: - None. Changes from v3: - Split binding into one separate patch. - Add LinusW reviewed tag. Changes from v2: - Rename the property

Re: [PATCH v5 6/6] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-10-22 Thread Baolin Wang
On 22 October 2018 at 18:43, Sebastian Reichel wrote: > Hi, > > On Mon, Oct 22, 2018 at 01:54:50PM +0800, Baolin Wang wrote: >> Hi Sebastian, >> >> On 22 October 2018 at 00:52, Sebastian Reichel wrote: >> > Hi, >> > >> > On Fri, Oct 19, 2

Re: [PATCH v2 2/2] power: supply: Add Spreadtrum SC2731 charger support

2018-09-16 Thread Baolin Wang
Hi Sebastian, On 16 September 2018 at 18:17, Sebastian Reichel wrote: > Hi Baolin, > > On Mon, Sep 03, 2018 at 04:55:46PM +0800, Baolin Wang wrote: >> This patch adds the SC2731 PMIC switch charger support. >> >> Signed-off-by: Baolin Wang >> --- > > The p

Re: [PATCH 1/2] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation

2018-09-16 Thread Baolin Wang
Hi Sebastian, On 16 September 2018 at 21:57, Sebastian Reichel wrote: > Hi, > > On Wed, Sep 12, 2018 at 03:29:38PM +0800, Baolin Wang wrote: >> This patch adds the binding documentation for Spreadtrum SC27XX series PMICs >> fuel gauge unit device, which is used to calculate

Re: [PATCH 2/2] power: supply: Add Spreadtrum SC27XX fuel gauge unit driver

2018-09-16 Thread Baolin Wang
+ >> + return 0; >> +} >> + >> +static int sc27xx_fgu_probe(struct platform_device *pdev) >> +{ >> + struct device_node *np = pdev->dev.of_node; >> + struct power_supply_config fgu_cfg = { }; >> + struct sc27xx_fgu_data *data; >> + int ret, irq; >> + >> + data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); >> + if (!data) >> + return -ENOMEM; >> + >> + data->regmap = dev_get_regmap(pdev->dev.parent, NULL); >> + if (!data->regmap) { >> + dev_err(&pdev->dev, "failed to get regmap\n"); >> + return -ENODEV; >> + } >> + >> + mutex_init(&data->lock); >> + data->dev = &pdev->dev; >> + data->bat_present = true; >> + >> + ret = sc27xx_fgu_parse_dt(data, np); >> + if (ret) >> + return ret; >> + >> + fgu_cfg.drv_data = data; >> + fgu_cfg.of_node = np; >> + data->battery = devm_power_supply_register(&pdev->dev, >> &sc27xx_fgu_desc, >> +&fgu_cfg); >> + if (IS_ERR(data->battery)) { >> + dev_err(&pdev->dev, "failed to register power supply\n"); >> + return PTR_ERR(data->battery); >> + } >> + >> + ret = sc27xx_fgu_hw_init(data); >> + if (ret) { >> + dev_err(&pdev->dev, "failed to initialize fgu hardware\n"); >> + return ret; >> + } >> + >> + ret = devm_add_action(&pdev->dev, sc27xx_fgu_disable, data); >> + if (ret) { >> + sc27xx_fgu_disable(data); >> + dev_err(&pdev->dev, "failed to add fgu disable action\n"); >> + return ret; >> + } >> + >> + irq = gpiod_to_irq(data->gpiod); >> + if (irq < 0) { >> + dev_err(&pdev->dev, "failed to translate GPIO to IRQ\n"); >> + return irq; >> + } >> + >> + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, >> + sc27xx_fgu_bat_detection, >> + IRQF_ONESHOT | IRQF_TRIGGER_RISING | >> + IRQF_TRIGGER_FALLING, >> + pdev->name, data); >> + if (ret) { >> + dev_err(&pdev->dev, "failed to request IRQ\n"); >> + return ret; >> + } >> + >> + return 0; >> +} >> + >> +static const struct of_device_id sc27xx_fgu_of_match[] = { >> + { .compatible = "sprd,sc2731-fgu", }, >> + { } >> +}; >> + >> +static struct platform_driver sc27xx_fgu_driver = { >> + .probe = sc27xx_fgu_probe, >> + .driver = { >> + .name = "sc27xx-fgu", >> + .of_match_table = sc27xx_fgu_of_match, >> + } >> +}; >> + >> +module_platform_driver(sc27xx_fgu_driver); >> + >> +MODULE_DESCRIPTION("Spreadtrum SC27XX PMICs Fual Gauge Unit Driver"); >> +MODULE_LICENSE("GPL v2"); >> -- >> 1.7.9.5 >> -- Baolin Wang Best Regards

[PATCH v2 5/5] serial: sprd: Fix the indentation issue

2018-09-17 Thread Baolin Wang
Make the macros' definition and code have the same correct indentation. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang --- Changes from v1: - Add acked tag from Chunyan. --- drivers/tty/serial/sprd_serial.c | 46 +++- 1 file changed, 22 inser

[PATCH v2 4/5] serial: sprd: Change 'int' to 'unsigned int'

2018-09-17 Thread Baolin Wang
The register offset value should be 'unsigned int' type. Moreover, prefer 'unsigned int' to bare use of 'unsigned'. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang --- Changes from v1: - Add acked tag from Chunyan. --- drivers/tty/serial/sprd_serial.c |

[PATCH v2 2/5] serial: sprd: Use readable macros instead of magic number

2018-09-17 Thread Baolin Wang
Define readable macros instead of magic number to make code more readable. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang --- Changes from v1: - Add acked tag from Chunyan. --- drivers/tty/serial/sprd_serial.c | 25 + 1 file changed, 17 insertions(+), 8 deletions

[PATCH v2 3/5] serial: sprd: Remove unnecessary resource validation

2018-09-17 Thread Baolin Wang
The devm_ioremap_resource() will valid the resources, thus remove the unnecessary resource validation in the driver. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang --- Changes from v1: - Add acked tag from Chunyan. --- drivers/tty/serial/sprd_serial.c | 7 ++- 1 file changed, 2

[PATCH v2 1/5] serial: sprd: Remove unused structure

2018-09-17 Thread Baolin Wang
Remove the unused reg_backup structure. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang --- Changes from v1: - Add acked tag from Chunyan. --- drivers/tty/serial/sprd_serial.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty

[PATCH v3 1/2] dt-bindings: power: Add Spreadtrum SC2731 charger documentation

2018-09-17 Thread Baolin Wang
This patch adds the binding documentation for Spreadtrum SC2731 charger device. Signed-off-by: Baolin Wang Reviewed-by: Krzysztof Kozlowski --- Changes from v2: - Add reviewed tag from Krzysztof. Changes from v1: - Add parent node. - Add some battery standard properties. --- .../bindings

[PATCH v3 2/2] power: supply: Add Spreadtrum SC2731 charger support

2018-09-17 Thread Baolin Wang
This patch adds the SC2731 PMIC switch charger support. Signed-off-by: Baolin Wang Reviewed-by: Krzysztof Kozlowski --- Changes from v2: - Add reviewed tag from Krzysztof. - Change current unit to uA instead of mA. Changes from v1: - Remove some redundant head files. - Add one mutex to

Re: [PATCH 1/2] dt-bindings: power: Add Spreadtrum SC27XX fuel gauge unit documentation

2018-09-17 Thread Baolin Wang
Hi Rob, On 17 September 2018 at 11:26, Rob Herring wrote: > On Wed, Sep 12, 2018 at 03:29:38PM +0800, Baolin Wang wrote: >> This patch adds the binding documentation for Spreadtrum SC27XX series PMICs >> fuel gauge unit device, which is used to calculate the battery capacity. >

Re: [RFC PATCH 1/2] time: Introduce one suspend clocksource to compensate the suspend time

2018-07-16 Thread Baolin Wang
Hi Thomas, On 16 July 2018 at 16:28, Thomas Gleixner wrote: > On Thu, 12 Jul 2018, Baolin Wang wrote: >> On some hardware with multiple clocksources, we have course grained >> clocksources that support the CLOCK_SOURCE_SUSPEND_NONSTOP flag, but >> which are less ideal for t

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-16 Thread Baolin Wang
implementations, >>>> but you seemed not to be so enthusiastic in [0]. >>>> >>>> [0] https://lkml.org/lkml/2017/4/7/350 >>> >>> >>> Hmm. Reading my own email now, I can't decipher it. >>> >>> I believe I meant "changing patterns from kernel in response to events >>> is probably overkill"... or something like that. >> >> >> Anyway -- to clean up the confusion -- I'd like to see >> >> echo pattern > trigger >> echo "1 2 3 4 5 6 7 8" > somewhere > > > s/somewhere/pattern/ > > pattern trigger should create "pattern" file similarly how ledtrig-timer > creates delay_{on|off} files. Yes. Anyway, I will submit V5 patchset with addressing previous comments, but did not include pattern trigger issue. -- Baolin Wang Best Regards

[PATCH v5 1/2] leds: core: Introduce generic pattern interface

2018-07-16 Thread Baolin Wang
attribute to configure the pattern for a given LED. [Baolin Wang did some improvements.] Signed-off-by: Bjorn Andersson Signed-off-by: Baolin Wang --- Changes from v4: - Fix some typos. - Check if pattern_clear() is initialized. Changes from v3: - Move the check in pattern_show() to

[PATCH v5 2/2] leds: sc27xx: Add pattern_set/get/clear interfaces for LED controller

2018-07-16 Thread Baolin Wang
This patch implements the 'pattern_set', 'pattern_get' and 'pattern_clear' interfaces to support SC27XX LED breathing mode. Signed-off-by: Baolin Wang --- Changes from v4: - None. Changes from v3: - None. Changes from v2: - No updates. Changes from v1: - No u

[PATCH 2/2] clocksource: sprd: Register one always-on timer to compensate suspend time

2018-07-17 Thread Baolin Wang
Since the clocksource framework has introduced one suspend clocksource to compensate the suspend time, this patch registers one always-on timer as the suspend clocksource. Signed-off-by: Baolin Wang --- Changes from RFC v1: - None. --- drivers/clocksource/timer-sprd.c | 50

[PATCH 1/2] time: Introduce one suspend clocksource to compensate the suspend time

2018-07-17 Thread Baolin Wang
icate code. To fix this, provide logic to allow a registered SUSPEND_NONSTOP clocksource, which isn't the current clocksource, to be used to calculate the suspend time. Suggested-by: Thomas Gleixner Signed-off-by: Baolin Wang --- Changes from RFC v1: - Improve commit message. - Remove the WA

[RESEND PATCH 1/4] sh: dreamcast: rtc: push down rtc class ops into driver

2018-07-17 Thread Baolin Wang
the RTC core code to take care of it. Signed-off-by: Arnd Bergmann Signed-off-by: Baolin Wang --- arch/sh/boards/mach-dreamcast/Makefile|4 +-- arch/sh/boards/mach-dreamcast/rtc.c | 39 + arch/sh/boards/mach-dreamcast/setup.c |1 - arch

[RESEND PATCH 3/4] sh: remove unused rtc_sh_get/set_time infrastructure

2018-07-17 Thread Baolin Wang
: Arnd Bergmann Signed-off-by: Baolin Wang --- arch/sh/include/asm/rtc.h |2 -- arch/sh/kernel/time.c | 69 - 2 files changed, 71 deletions(-) diff --git a/arch/sh/include/asm/rtc.h b/arch/sh/include/asm/rtc.h index c63555e..fe55fbb 100644

[RESEND PATCH 4/4] sh: remove board_time_init() callback

2018-07-17 Thread Baolin Wang
Bergmann Signed-off-by: Baolin Wang --- Documentation/sh/new-machine.txt |8 arch/sh/boards/of-generic.c |8 arch/sh/include/asm/rtc.h|1 - arch/sh/kernel/time.c|5 + 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a

[RESEND PATCH 2/4] sh: sh03: rtc: push down rtc class ops into driver

2018-07-17 Thread Baolin Wang
this could be improved if anyone cares. Also, the file should ideally be moved into drivers/rtc and not use rtc-generic. Signed-off-by: Arnd Bergmann Signed-off-by: Baolin Wang --- arch/sh/boards/mach-sh03/Makefile |3 ++- arch/sh/boards/mach-sh03/rtc.c

Re: [PATCH v3 1/2] leds: core: Introduce generic pattern interface

2018-07-18 Thread Baolin Wang
sable the pattern. > > I'd deactivate the pattern by simply writing something else to the > trigger file. For the case we met in patch 2, it is not related with trigger things. We just set some series of tuples including brightness and duration (ms) to the hardware to enable the breath mode of the LED, we did not trigger anything. So it is weird to write something to trigger file to deactive the pattern. -- Baolin Wang Best Regards

[PATCH v3] mm: compaction: update the cc->nr_migratepages when allocating or freeing the freepages

2024-02-19 Thread Baolin Wang
both-18 7351.11 ( 0.00%) 6950.51 * 5.45%* Amean fault-both-24 9059.30 ( 0.00%) 9159.99 * -1.11%* Amean fault-both-3010685.68 ( 0.00%)11399.02 * -6.68%* Signed-off-by: Baolin Wang Acked-by: Mel Gorman --- Hi Andrew, please use this patch to replace below

Re: [PATCH v2] dt-bindings: hwlock: sprd-hwspinlock: convert to YAML

2024-07-04 Thread Baolin Wang
On 2024/7/4 19:38, Stanislav Jakubek wrote: Convert the Spreadtrum hardware spinlock bindings to DT schema. Reviewed-by: Conor Dooley Signed-off-by: Stanislav Jakubek LGTM. Thanks. Reviewed-by: Baolin Wang --- Changes in V2: - fix double space in example - switch to #address

[PATCH v2 01/15] linux/time64.h:Introduce the 'struct itimerspec64' for 64bit

2015-04-30 Thread Baolin Wang
This patch introduces the 'struct itimerspec64' for 64bit to replace itimerspec, and also introduces the conversion methods: itimerspec64_to_itimerspec() and itimerspec_to_itimerspec64(), that makes itimerspec ready for 2038 year. Signed-off-by: Baolin Wang --- include/linux/time6

[PATCH v2 00/15] Convert the posix_clock_operations and k_clock structure to ready for 2038

2015-04-30 Thread Baolin Wang
methods in cputime_nsecs.h file. -Modify some patch logs. Baolin Wang (15): linux/time64.h:Introduce the 'struct itimerspec64' for 64bit timekeeping:Introduce the current_kernel_time64() function with timespec64 type time/hrtimer:Introduce hrtimer_get_res64() with times

[PATCH v2 02/15] timekeeping:Introduce the current_kernel_time64() function with timespec64 type

2015-04-30 Thread Baolin Wang
easily in timekeeping.h file. That is ready for 2038 when get the current time. Signed-off-by: Baolin Wang --- include/linux/timekeeping.h | 10 +- kernel/time/timekeeping.c |6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/linux/timekeeping.h b/inc

[PATCH v2 03/15] time/hrtimer:Introduce hrtimer_get_res64() with timespec64 type for getting the timer resolution

2015-04-30 Thread Baolin Wang
olution by hrtimer_get_res64() function with timespec64 type, and it is convenient to delete the old hrtimer_get_res() function in hrtimer.h file. Signed-off-by: Baolin Wang --- include/linux/hrtimer.h | 12 +++- kernel/time/hrtimer.c | 10 +- 2 files changed, 16 insert

[PATCH v2 04/15] posix timers:Introduce the 64bit methods with timespec64 type for k_clock structure

2015-04-30 Thread Baolin Wang
This patch introduces the new methods with timespec64/itimerspec64 type for k_clcok structure,converts the timepsec type to timespec64 type in k_clock structure and converts the itimerspec type to itimerspec64 type to ready for 2038 issue. Signed-off-by: Baolin Wang --- include/linux/posix

[PATCH v2 05/15] posix-timers:Split out the guts of the syscall and change the implementation

2015-04-30 Thread Baolin Wang
This patch splits out the guts of the syscall and changes the syscall implementation to prepare the converting to 64bit methods for the syscall function in posix-timers.c file. And next patch will convert the syscall to 64bit methods with timespec64/itimerspec64 type. Signed-off-by: Baolin Wang

[PATCH v2 06/15] posix-timers:Convert to the 64bit methods for the syscall function

2015-04-30 Thread Baolin Wang
This patch converts to the 64bit methods with timespec64/itimerspec64 type for the syscall function, and changes the syscall implementation according to the CONFIG_64BIT macro. Also introduces some default functions with timespec64/itimerspec64 type for the 64bit methods. Signed-off-by: Baolin

[PATCH v2 07/15] time:Introduce the do_sys_settimeofday64() function with timespec64 type

2015-04-30 Thread Baolin Wang
This patch introduces the do_sys_settimeofday64() function with timespec64 type, that makes this function ready for 2038 issue when setting the time of day. And moves the do_sys_settimeofday() function to the timekeeping.h file. Signed-off-by: Baolin Wang --- include/linux/timekeeping.h | 12

[PATCH v2 08/15] time/posix-timers:Convert to the 64bit methods for k_clock callback functions

2015-04-30 Thread Baolin Wang
. Signed-off-by: Baolin Wang --- include/linux/timekeeping.h |4 +- kernel/time/posix-timers.c | 96 +-- kernel/time/timekeeping.h |2 +- 3 files changed, 51 insertions(+), 51 deletions(-) diff --git a/include/linux/timekeeping.h b/include/linux

[PATCH v2 09/15] char/mmtimer:Convert to the 64bit methods for k_clock callback function

2015-04-30 Thread Baolin Wang
This patch converts to the 64bit methods for k_clock callback function, that converts the timespec type to timespec64 type and converts the itimerspec type to itimerspec64 type. Signed-off-by: Baolin Wang --- drivers/char/mmtimer.c | 36 +--- 1 file changed, 17

[PATCH v2 10/15] time/alarmtimer:Convert to the new methods for k_clock structure

2015-04-30 Thread Baolin Wang
This patch changes to the new methods with timespec64/itimerspec64 type of k_clock structure, and converts the timespec/itimerspec type to timespec64/itimerspec64 typein alarmtimer.c file. Signed-off-by: Baolin Wang --- kernel/time/alarmtimer.c | 43

[PATCH v2 11/15] time/posix-clock:Convert to the 64bit methods for k_clock and posix_clock_operations structure

2015-04-30 Thread Baolin Wang
/itimerspec64 type. Signed-off-by: Baolin Wang --- drivers/ptp/ptp_clock.c | 26 -- include/linux/posix-clock.h | 10 +- kernel/time/posix-clock.c | 20 ++-- 3 files changed, 23 insertions(+), 33 deletions(-) diff --git a/drivers/ptp

[PATCH v2 12/15] time/time:Introduce the timespec64_to_jiffies/jiffies_to_timespec64 function

2015-04-30 Thread Baolin Wang
This patch introduces the timespec64_to_jiffies() and jiffies_to_timespec64() functions, that implement the conversion between cputime and timespec64. And remove the old functions timespec64_to_jiffies()/jiffies_to_timespec64() to jiffies.h file. Signed-off-by: Baolin Wang --- include/linux

[PATCH v2 13/15] cputime:Introduce the cputime_to_timespec64/timespec64_to_cputime function

2015-04-30 Thread Baolin Wang
for 2038 issue. The cputime_to_timespec/timespec_to_cputime functions are moved to include/linux/cputime.h file for removing conveniently. Signed-off-by: Baolin Wang --- arch/powerpc/include/asm/cputime.h|6 +++--- arch/s390/include/asm/cputime.h |8 include/asm

[PATCH v2 14/15] time/posix-cpu-timers:Convert to the 64bit methods for k_clock structure

2015-04-30 Thread Baolin Wang
This patch changes to the new methods of k_clock structure with timespec64 type, converts the timespec/itimerspec type to timespec64/itimerspec64 type for the callback function in posix-cpu-timers.c file. Signed-off-by: Baolin Wang --- kernel/time/posix-cpu-timers.c | 83

[PATCH v2 15/15] k_clock:Remove the 32bit methods with timespec/itimerspec type

2015-04-30 Thread Baolin Wang
All of the k_clock users have been converted to the new methods. This patch removes the older methods with timepsec/itimerspec type. As a result, the k_clock structure is ready for the year 2038. Signed-off-by: Baolin Wang --- include/linux/posix-timers.h |9 - kernel/time/posix

[PATCH 00/11] Convert the posix_clock_operations and k_clock structure to ready for 2038

2015-04-19 Thread Baolin Wang
type for posix_clock_operations and k_clock structure. Also introduces some new functions with timespec64/itimerspec64 type, like current_kernel_time64(), hrtimer_get_res64(), cputime_to_timespec64() and timespec64_to_cputime(). Baolin Wang (11): linux/time64.h:Introduce the 'struct itimers

[PATCH 04/11] posix timers:Introduce the 64bit methods with timespec64 type for k_clock structure

2015-04-19 Thread Baolin Wang
framework functions. Next step will migrate all the k_clock users to use the new methods with timespec64 type nd itimerspec64 type, and it contains the files of posix-timers.c, mmtimer.c, alarmtimer.c, posix-clock.c and posix-cpu-timers.c. Signed-off-by: Baolin Wang --- include/linux/posix

[PATCH 02/11] timekeeping:Introduce the current_kernel_time64() function with timespec64 type

2015-04-19 Thread Baolin Wang
easily in timekeeping.h file. That is ready for 2038 when get the current time. Signed-off-by: Baolin Wang --- include/linux/timekeeping.h | 10 +- kernel/time/timekeeping.c |6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/linux/timekeeping.h b/inc

[PATCH 06/11] char/mmtimer:Convert to the 64bit methods for k_clock callback function

2015-04-19 Thread Baolin Wang
This patch converts to the 64bit methods for k_clock callback function, that converts the timespec type to timespec64 type and converts the itimerspec type to itimerspec64 type. Signed-off-by: Baolin Wang --- drivers/char/mmtimer.c | 36 +--- 1 file changed, 17

[PATCH 01/11] linux/time64.h:Introduce the 'struct itimerspec64' for 64bit

2015-04-19 Thread Baolin Wang
This patch introduces the 'struct itimerspec64' for 64bit to replace itimerspec, and also introduces the conversion methods: itimerspec64_to_itimerspec() and itimerspec_to_itimerspec64(), that makes itimerspec to ready for 2038 year. Signed-off-by: Baolin Wang --- include/linux/time6

[PATCH 07/11] time/alarmtimer:Convert to the new methods for k_clock structure

2015-04-19 Thread Baolin Wang
This patch changes to the new methods with timespec64/itimerspec64 type of k_clock structure, and converts the timespec/itimerspec type to timespec64/itimerspec64 typein alarmtimer.c file. Signed-off-by: Baolin Wang --- kernel/time/alarmtimer.c | 43

[PATCH 03/11] time/hrtimer:Introduce hrtimer_get_res64() with timespec64 type for getting the timer resolution

2015-04-19 Thread Baolin Wang
olution by hrtimer_get_res64() function with timespec64 type, and it is convenient to delete the old hrtimer_get_res() function in hrtimer.h file. Signed-off-by: Baolin Wang --- include/linux/hrtimer.h | 12 +++- kernel/time/hrtimer.c | 10 +- 2 files changed, 16 insert

[PATCH 08/11] time/posix-clock:Convert to the 64bit methods for k_clock and posix_clock_operations structure

2015-04-19 Thread Baolin Wang
/itimerspec64 type. Signed-off-by: Baolin Wang --- drivers/ptp/ptp_clock.c | 26 -- include/linux/posix-clock.h | 10 +- kernel/time/posix-clock.c | 20 ++-- 3 files changed, 23 insertions(+), 33 deletions(-) diff --git a/drivers/ptp

[PATCH 11/11] k_clock:Remove the 32bit methods with timespec type

2015-04-19 Thread Baolin Wang
All of the k_clock users have been converted to the new methods. This patch removes the older methods with timepsec/itimerspec type. As a result, the k_clock structure is ready for the year 2038. Signed-off-by: Baolin Wang --- include/linux/posix-timers.h |9 -- kernel/time/posix

[PATCH 05/11] time/posix-timers:Convert to the 64bit methods for k_clock callback functions

2015-04-19 Thread Baolin Wang
. Signed-off-by: Baolin Wang --- include/linux/timekeeping.h |4 +- kernel/time/posix-timers.c | 102 +++ kernel/time/timekeeping.h |2 +- 3 files changed, 57 insertions(+), 51 deletions(-) diff --git a/include/linux/timekeeping.h b/include/linux

[PATCH 10/11] time/posix-cpu-timers:Convert to the 64bit methods for k_clock structure

2015-04-19 Thread Baolin Wang
This patch changes to the new methods of k_clock structure with timespec64 type, converts the timespec/itimerspec type to timespec64/itimerspec64 type for the callback function in posix-cpu-timers.c file. Signed-off-by: Baolin Wang --- kernel/time/posix-cpu-timers.c | 83

[PATCH 09/11] cputime:Introduce the cputime_to_timespec64/timespec64_to_cputime function

2015-04-19 Thread Baolin Wang
for 2038 issue. The cputime_to_timespec/timespec_to_cputime functions are moved to include/linux/cputime.h file for removing conveniently. Signed-off-by: Baolin Wang --- arch/powerpc/include/asm/cputime.h|6 +++--- arch/s390/include/asm/cputime.h |8 include/asm

[PATCH v5 00/24] Convert the posix_clock_operations and k_clock structure to ready for 2038

2015-06-12 Thread Baolin Wang
. Changes since V1: - Split some patch into small patch. - Add some default function for new 64bit methods for syscall function. - Move do_sys_settimeofday() function to head file. - Modify the EXPORT_SYMPOL issue. - Add new 64bit methods in cputime_nsecs.h file. --- Baolin Wang (24): time: Introduce

[PATCH v5 01/24] time: Introduce struct itimerspec64

2015-06-12 Thread Baolin Wang
The itimerspec is not year 2038 safe on 32bit systems due to the limitation of the struct timespec members. Introduce itimerspec64 which uses struct timespec64 instead and provide conversion functions. Signed-off-by: Baolin Wang --- include/linux/time64.h | 35

[PATCH v5 02/24] timekeeping: Introduce current_kernel_time64()

2015-06-12 Thread Baolin Wang
The current_kernel_time() is not year 2038 safe on 32bit systems due to return timespec value. Introduce current_kernel_time64() function which returns timespec64 value, also as a helper function calling by current_kernel_time(). Signed-off-by: Baolin Wang --- include/linux/timekeeping.h | 10

[PATCH v5 03/24] security: Introduce security_settime64()

2015-06-12 Thread Baolin Wang
security_settime64(). The cap_settime() as a helper function is only called by security_settime64() and security_settime() functions, and it need change the argument with timespec64 type. Signed-off-by: Baolin Wang --- include/linux/lsm_hooks.h |5 +++-- include/linux/security.h | 20

[PATCH v5 04/24] time: Introduce do_sys_settimeofday64()

2015-06-12 Thread Baolin Wang
future, it should move the do_sys_settimeofday() function to the timekeeping.h file as a 'static inline' helper that just calls do_sys_settimeofday64(). Signed-off-by: Baolin Wang --- include/linux/timekeeping.h | 11 +-- kernel/time/time.c |8 2 files c

<    1   2   3   4   5   6   7   8   9   10   >