mbox series

[0/3] clocksource: sun5i: clean up and convert to platform driver

Message ID 20230630201800.16501-1-mans@mansr.com (mailing list archive)
Headers show
Series clocksource: sun5i: clean up and convert to platform driver | expand

Message

Måns Rullgård June 30, 2023, 8:01 p.m. UTC
The first two of these patches remove a bunch of duplicated code/data in
the sun5i hstimer driver.  To keep the diff clearer, the first patch
introduces an otherwise pointless struct which is then removed in the
second.

The third patch converts the driver to a platform_device driver.  This
is to make it work again on A20 and A31 (I think) where it broke when
the ccu driver was changed to a platform driver.

I have only tested this on an A20 where the hstimer is registered as
expected and can be selected through sysfs.  I hope it doesn't break
something else.

Some additional discussion here:
https://lore.kernel.org/linux-clk/20211119033338.25486-4-samuel@sholland.org/

Mans Rullgard (3):
  clocksource: sun5i: remove duplication of code and data
  clocksource: sun5i: remove pointless struct
  clocksource: sun5i: convert to platform device driver

 drivers/clocksource/timer-sun5i.c | 288 +++++++++++++-----------------
 1 file changed, 123 insertions(+), 165 deletions(-)

Comments

Maxime Ripard July 3, 2023, 8:33 a.m. UTC | #1
On Fri, 30 Jun 2023 21:01:25 +0100, Mans Rullgard wrote:
> The first two of these patches remove a bunch of duplicated code/data in
> the sun5i hstimer driver.  To keep the diff clearer, the first patch
> introduces an otherwise pointless struct which is then removed in the
> second.
> 
> 
> [ ... ]

Acked-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime
Daniel Lezcano Aug. 18, 2023, 10:16 a.m. UTC | #2
On 30/06/2023 22:01, Mans Rullgard wrote:
> The first two of these patches remove a bunch of duplicated code/data in
> the sun5i hstimer driver.  To keep the diff clearer, the first patch
> introduces an otherwise pointless struct which is then removed in the
> second.
> 
> The third patch converts the driver to a platform_device driver.  This
> is to make it work again on A20 and A31 (I think) where it broke when
> the ccu driver was changed to a platform driver.
> 
> I have only tested this on an A20 where the hstimer is registered as
> expected and can be selected through sysfs.  I hope it doesn't break
> something else.
> 
> Some additional discussion here:
> https://lore.kernel.org/linux-clk/20211119033338.25486-4-samuel@sholland.org/
> 
> Mans Rullgard (3):
>    clocksource: sun5i: remove duplication of code and data
>    clocksource: sun5i: remove pointless struct
>    clocksource: sun5i: convert to platform device driver
> 
>   drivers/clocksource/timer-sun5i.c | 288 +++++++++++++-----------------
>   1 file changed, 123 insertions(+), 165 deletions(-)

Applied, thanks