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
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.
>
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
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
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
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
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
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
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
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:
> [...]
>> >
>> >
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
>
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
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
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
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
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
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
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
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.
>>
&
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
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
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
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
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
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
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
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
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
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
+
>> + 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
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
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 |
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
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
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
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
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
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.
>
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
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
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
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
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
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
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
: 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
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
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
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
/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
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
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
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
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
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
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
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
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
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
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
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
/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
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
.
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
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
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
.
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
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
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
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
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
401 - 500 of 2198 matches
Mail list logo