Commit graph

4304 commits

Author SHA1 Message Date
Linus Torvalds
b349de4c91 RTC for 6.5
Subsystem:
  - Switch i2c drivers back to use .probe()
  - Constify pointers to hwmon_channel_info
 
 New driver:
  - Loongson on chip RTC, replacing the Loongson 1 only driver
 
 Drivers:
  - isl1208: cleanup and support for RAA215300
  - st-lpc: cleanups
  - stm32: fix wakeup
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEBqsFVZXh8s/0O5JiY6TcMGxwOjIFAmSh9hIACgkQY6TcMGxw
 OjL53Q//SgdS6dFJwaWrol+MihLa092PkrVHLnBiPfA77huVSFPkPb1hD+1/PWGe
 ThTwXypQwiFk1hrLQUHLM8NiUo5DmmRrDlphSLrmCOloB0d0fNpfhH6FU5yOP9V4
 XoYaQlY3FX8RXqHYjn5Vc5Fp1pSyNGo4MAzYbMb8j/hrTJmRFocbdygQiHjrKgIp
 mOegYrffrMZz24vCAIs3mvT2mgBmDxe7QwuI2Wmbm0ZLfEigv1ETIHGUyBfjTMJH
 ZAd0MA9dg1+hLJw4BkJFo6PpvKEY6wjquP+1nKQpfSB3kfOyEeXtf9Y9M3cXEj36
 u8EDSfz0xrHpd4W0XzakeD90tovsCRWeA5sNooefwz5BJQ3aJjGfDZTXCEaWGV4S
 fQ7TS2pz2+ZzW3nBUFxtVD0SmctovixO8KOwhmMhCJXz3XprVdmulD6PTheRNZ/Z
 edJdty0XTYMYpvIQuaxO/bA4Df4PB4FSBHtKPg2w+KMxDivr+fS/klxSo3OcLJIU
 7EZMcJ7Ygvdw4a7/QZZbWEaJrnZ7XerFOFRdXggdTdhy1ozSObtXpJTdXL5/6hR5
 6if0fbGYVSjUkooj+oEaCihpc+8tmbdKk+iC55Gkay9M2lCbbeXSy9VFLKP/UnnU
 q7NUYRTDWgAjJAleHG9TSO02iS+nKZ6dv+IRVL01mVSVxglSQpg=
 =+0zF
 -----END PGP SIGNATURE-----

Merge tag 'rtc-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

Pull RTC updates from Alexandre Belloni:
 "The isl1208 dirver was reworked tobe able to work as part of an MFD.

  All the Loongson chips are now supported through a new driver, the old
  one is removed.

  Summary:

  Subsystem:
   - Switch i2c drivers back to use .probe()
   - Constify pointers to hwmon_channel_info

  New driver:
   - Loongson on chip RTC, replacing the Loongson 1 only driver

  Drivers:
   - isl1208: cleanup and support for RAA215300
   - st-lpc: cleanups
   - stm32: fix wakeup"

* tag 'rtc-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (21 commits)
  rtc: Add rtc driver for the Loongson family chips
  rtc: Remove the Loongson-1 RTC driver
  dt-bindings: rtc: Split loongson,ls2x-rtc into SoC-based compatibles
  rtc: rv3028: make rv3028 probeable from userspace
  rtc: isl1208: Add support for the built-in RTC on the PMIC RAA215300
  rtc: isl1208: Add isl1208_set_xtoscb()
  rtc: isl1208: Drop enum isl1208_id and split isl1208_configs[]
  rtc: isl1208: Make similar I2C and DT-based matching table
  rtc: isl1208: Drop name variable
  dt-bindings: rtc: isil,isl1208: Document clock and clock-names properties
  dt-bindings: rtc: isl1208: Convert to json-schema
  rtc: st-lpc: Simplify clk handling in st_rtc_probe()
  rtc: st-lpc: Release some resources in st_rtc_probe() in case of error
  rtc: stm32: remove dedicated wakeup management
  dt-bindings: rtc: restrict node name suffixes
  rtc: add HAS_IOPORT dependencies
  rtc: Switch i2c drivers back to use .probe()
  rtc: rv3032: constify pointers to hwmon_channel_info
  rtc: isl12022: constify pointers to hwmon_channel_info
  rtc: ds3232: constify pointers to hwmon_channel_info
  ...
2023-07-03 10:43:10 -07:00
Linus Torvalds
ff7ddcf0db This batch of clk driver updates for the merge window contains almost no new
SoC support. Instead there's a treewide patch series from Maxime that makes
 clk_ops::determine_rate mandatory for muxes. Beyond that core framework change
 we have the usual pile of clk driver updates such as migrating i2c drivers to
 use .probe() again or YAMLfication of clk DT bindings so we can validate DTBs.
 Overall the SoCs that got the most updates this time around in terms of
 diffstat are the Amlogic and Mediatek drivers because they added new SoC
 support or fixed up various drivers to have proper data.
 
 In general things look kinda quiet. I suspect the core framework change may
 still shake out some problems after the merge window, mostly because not
 everyone tests linux-next where that series has been for some number of weeks.
 I saw that there's at least one pending fix for Tegra that needs to be wrapped
 up into a proper patch. I'll try to catch those bits before the window closes
 so that -rc1 is bootable. More details below.
 
 Core:
  - Make clk_ops::determine_rate mandatory for muxes
 
 New Drivers:
  - Add amlogic a1 SoC family PLL and peripheral clock controller support
 
 Updates:
  - Handle allocation failures from kasprintf() and friends
  - Migrate platform clk drivers to .remove_new()
  - Migrate i2c clk drivers to .probe() instead of .probe_new()
  - Remove CLK_SET_PARENT from all Mediatek MSDC core clocks
  - Add infra_ao reset support for Mediatek MT8188 SoCs
  - Align driver_data to i2c_device_id tables in some i2c clk drivers
  - Use device_get_match_data() in vc5 clk driver
  - New Kconfig symbol name (SOC_MICROCHIP_POLARFIRE) for Microchip FPGA clock
    drivers
  - Use of_property_read_bool() to read "microchip,pic32mzda-sosc" boolean DT
    property in clk-pic32mzda
  - Convert AT91 clock dt-bindings to YAML
  - Remove CLK_SET_RATE_PARENT flag from LDB clocks on i.MX6SX
  - Keep i.MX UART clocks enabled during kernel boot if earlycon is set
  - Drop imx_unregister_clocks() as there are no users anymore
  - Switch to _safe iterator on imx_clk_scu_unregister() to avoid use after free
  - Add determine_rate op to the imx8m composite clock
  - Use device managed API for iomap and kzalloc for i.MXRT1050, i.MX8MN,
    i.MX8MP and i.MX93 clock controller drivers
  - Add missing interrupt DT property for the i.MX8M clock controller
  - Re-add support for Exynos4212 clock controller because we are
    re-introducing the SoC in the mainline
  - Add CONFIG_OF dependency to Samsung clk Kconfig symbols to solve some
    objtool warnings
  - Preselect PLL MIPI as TCON0 parent for Allwinner A64 SoC
  - Convert the Renesas clock drivers to readl_poll_timeout_atomic()
  - Add PWM clock on Renesas R-Car V3U
  - Fix PLL5 on Renesas RZ/G2L and RZ/V2L
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmSaakgRHHNib3lkQGtl
 cm5lbC5vcmcACgkQrQKIl8bklSV1ShAAvvDE7CbcWQqIQvweGL/WjFEp+05OBQHs
 eqHVEZshdw2Bk7eVyaU86Yjasq317yd0PUo/Mnme7tr4Od5WauegXhM5mR85crfQ
 qdA3/A/3ZyvlSxWCefsoXEee62D/2fLGro73NFWlYWf3U7j4saAxw/Fto9AAyZQd
 kX0kAmrKzjRJPyh2xTJlz5b5os3D1SOstmPXjUGuv+2gaC5cBt/pEd+vPX+OW5mD
 IFy+N1CVx2UHJrvK5qCzuP8Aun3usFM2fvMEjfThuR0h7gaTU67sdqydl7a30PzU
 fM+vsQVnU8VxCqquZ4lGWa+pvFSID3tuBdy+B7d2EQnID0558Qom8+syKC2nN0/m
 kN/W4fgWCkoMSHj50VYpbRMUHn8N96t/61uoxAF+byGGZ4h8xxgGylSZVip7awbh
 yUJWvPmDq2UKJzjr3jILEjvigUun3PjezT2D9me64z+TUKAFMtomAt75U1pAShtO
 tWsvC2u2GLns9PS3EC3ov9zhiyVN9MjzlqYEjgGbM2C3swJgY8nnnO2izMpuaC9L
 fB8HtzMNwu+Ct6MKISabHex2Oeh3yhEtfZaldx2DdV05ejxndDzNz4sfh7XAkrFr
 G3x+yn94geaYL0/OMhDw/MqdVWIiTf4q8FYK6yv7XicIQGtLs2GHXxHJf1ltCxHb
 nCnNBgJmYXo=
 =6M8D
 -----END PGP SIGNATURE-----

Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk updates from Stephen Boyd:
 "This batch of clk driver updates contains almost no new SoC support.
  Instead there's a treewide patch series from Maxime that makes
  clk_ops::determine_rate mandatory for muxes.

  Beyond that core framework change we have the usual pile of clk driver
  updates such as migrating i2c drivers to use .probe() again or
  YAMLfication of clk DT bindings so we can validate DTBs.

  Overall the SoCs that got the most updates this time around in terms
  of diffstat are the Amlogic and Mediatek drivers because they added
  new SoC support or fixed up various drivers to have proper data.

  In general things look kinda quiet. I suspect the core framework
  change may still shake out some problems after the merge window,
  mostly because not everyone tests linux-next where that series has
  been for some number of weeks. I saw that there's at least one pending
  fix for Tegra that needs to be wrapped up into a proper patch. I'll
  try to catch those bits before the window closes so that -rc1 is
  bootable. More details below.

  Core:
   - Make clk_ops::determine_rate mandatory for muxes

  New Drivers:
   - Add amlogic a1 SoC family PLL and peripheral clock controller support

  Updates:
   - Handle allocation failures from kasprintf() and friends
   - Migrate platform clk drivers to .remove_new()
   - Migrate i2c clk drivers to .probe() instead of .probe_new()
   - Remove CLK_SET_PARENT from all Mediatek MSDC core clocks
   - Add infra_ao reset support for Mediatek MT8188 SoCs
   - Align driver_data to i2c_device_id tables in some i2c clk drivers
   - Use device_get_match_data() in vc5 clk driver
   - New Kconfig symbol name (SOC_MICROCHIP_POLARFIRE) for Microchip
     FPGA clock drivers
   - Use of_property_read_bool() to read "microchip,pic32mzda-sosc"
     boolean DT property in clk-pic32mzda
   - Convert AT91 clock dt-bindings to YAML
   - Remove CLK_SET_RATE_PARENT flag from LDB clocks on i.MX6SX
   - Keep i.MX UART clocks enabled during kernel boot if earlycon is set
   - Drop imx_unregister_clocks() as there are no users anymore
   - Switch to _safe iterator on imx_clk_scu_unregister() to avoid use
     after free
   - Add determine_rate op to the imx8m composite clock
   - Use device managed API for iomap and kzalloc for i.MXRT1050,
     i.MX8MN, i.MX8MP and i.MX93 clock controller drivers
   - Add missing interrupt DT property for the i.MX8M clock controller
   - Re-add support for Exynos4212 clock controller because we are
     re-introducing the SoC in the mainline
   - Add CONFIG_OF dependency to Samsung clk Kconfig symbols to solve
     some objtool warnings
   - Preselect PLL MIPI as TCON0 parent for Allwinner A64 SoC
   - Convert the Renesas clock drivers to readl_poll_timeout_atomic()
   - Add PWM clock on Renesas R-Car V3U
   - Fix PLL5 on Renesas RZ/G2L and RZ/V2L"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (149 commits)
  clk: fix typo in clk_hw_register_fixed_rate_parent_data() macro
  clk: Fix memory leak in devm_clk_notifier_register()
  clk: mvebu: Iterate over possible CPUs instead of DT CPU nodes
  clk: mvebu: Use of_get_cpu_hwid() to read CPU ID
  MAINTAINERS: Add Marvell mvebu clock drivers
  clk: clocking-wizard: check return value of devm_kasprintf()
  clk: ti: clkctrl: check return value of kasprintf()
  clk: keystone: sci-clk: check return value of kasprintf()
  clk: si5341: free unused memory on probe failure
  clk: si5341: check return value of {devm_}kasprintf()
  clk: si5341: return error if one synth clock registration fails
  clk: cdce925: check return value of kasprintf()
  clk: vc5: check memory returned by kasprintf()
  clk: mediatek: clk-mt8173-apmixedsys: Fix iomap not released issue
  clk: mediatek: clk-mt8173-apmixedsys: Fix return value for of_iomap() error
  clk: mediatek: clk-mtk: Grab iomem pointer for divider clocks
  clk: keystone: syscon-clk: Add support for audio refclk
  dt-bindings: clock: Add binding documentation for TI Audio REFCLK
  dt-bindings: clock: ehrpwm: Remove unneeded syscon compatible
  clk: keystone: syscon-clk: Allow the clock node to not be of type syscon
  ...
2023-06-29 10:05:47 -07:00
Binbin Zhou
1b733a9ebc rtc: Add rtc driver for the Loongson family chips
The Loongson family chips use an on-chip counter 0 (Time Of Year
counter) as the RTC. We will refer to them as rtc-loongson.

Cc: Keguang Zhang <keguang.zhang@gmail.com>
Cc: Yang Ling <gnaygnil@gmail.com>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@kernel.org>
Signed-off-by: WANG Xuerui <git@xen0n.name>
Reviewed-by: Keguang Zhang <keguang.zhang@gmail.com>
Tested-by: Keguang Zhang <keguang.zhang@gmail.com>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Tested-by: Jiaxun Yang <jiaxun.yang@flygoat.com> # LS7A
Link: https://lore.kernel.org/r/0c5171156390f614d72f36ceb04a20f432ca639e.1685693501.git.zhoubinbin@loongson.cn
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-26 01:19:11 +02:00
Binbin Zhou
9fb2309065 rtc: Remove the Loongson-1 RTC driver
Remove the ls1x-rtc driver as it is obsolete. We will continue to
support the ls1x RTC in the upcoming Loongson unified RTC driver
rtc-loongson.

Cc: Keguang Zhang <keguang.zhang@gmail.com>
Cc: zhao zhang <zhzhl555@gmail.com>
Cc: Yang Ling <gnaygnil@gmail.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Acked-by: Keguang Zhang <keguang.zhang@gmail.com>
Link: https://lore.kernel.org/r/c38c666015a162d7031b20a48209ce577bab62cd.1685693501.git.zhoubinbin@loongson.cn
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-26 01:19:11 +02:00
Johannes Kirchmair
7e2a60efab rtc: rv3028: make rv3028 probeable from userspace
With this commit, it will be possible to bind a rv3028 device from
userspace

This is done by:
echo rtc-rv3028 0x52 > /sys/bus/i2c/devices/i2c-XX/new_device

Signed-off-by: Johannes Kirchmair <johannes.kirchmair@sigmatek.at>
Link: https://lore.kernel.org/r/20230327085550.1721861-1-johannes.kirchmair@sigmatek.at
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-26 01:05:13 +02:00
Biju Das
fdd63f65ac rtc: isl1208: Add support for the built-in RTC on the PMIC RAA215300
The built-in RTC found on PMIC RAA215300 is the same as ISL1208.
However, the external oscillator bit is inverted on PMIC version
0x11. The PMIC driver detects PMIC version and instantiates the
RTC device based on i2c_device_id.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230623140948.384762-11-biju.das.jz@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-26 00:58:21 +02:00
Biju Das
262f72b465 rtc: isl1208: Add isl1208_set_xtoscb()
As per the HW manual, set the XTOSCB bit as follows:

If using an external clock signal, set the XTOSCB bit as 1 to
disable the crystal oscillator.

If using an external crystal, the XTOSCB bit needs to be set at 0
to enable the crystal oscillator.

Add isl1208_set_xtoscb() to set XTOSCB bit based on the clock-names
property. Fallback is enabling the internal crystal oscillator.

While at it, introduce a variable "sr" for reading the status register
in probe() as it is reused for writing and also remove the unnecessary
blank line.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230623140948.384762-10-biju.das.jz@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-26 00:58:21 +02:00
Biju Das
5923fc75d0 rtc: isl1208: Drop enum isl1208_id and split isl1208_configs[]
Drop enum isl1208_id and split the array isl1208_configs[] as individual
variables, and make lines shorter by referring to e.g. &config_isl1219
instead of &isl1208_configs[TYPE_ISL1219].

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230623140948.384762-9-biju.das.jz@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-26 00:58:21 +02:00
Biju Das
fbc06a5356 rtc: isl1208: Make similar I2C and DT-based matching table
The isl1208_id[].driver_data could store a pointer to the config,
like for DT-based matching, making I2C and DT-based matching
more similar.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230623140948.384762-8-biju.das.jz@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-26 00:58:21 +02:00
Biju Das
380960c40a rtc: isl1208: Drop name variable
Drop unused name variable from struct isl1208_config.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230623140948.384762-7-biju.das.jz@bp.renesas.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-26 00:58:21 +02:00
Christophe JAILLET
0e6f36cca1 rtc: st-lpc: Simplify clk handling in st_rtc_probe()
Use devm_clk_get_enabled() instead of hand writing it. This simplifies
error handling and removes some lines of code.

Also use dev_err_probe() which filters -EPROBE_DEFER.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/992dd8c31be0bb5b8a9d8b5e8e94807ab0848a66.1686251455.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-26 00:53:19 +02:00
Christophe JAILLET
06c6e1b01d rtc: st-lpc: Release some resources in st_rtc_probe() in case of error
If an error occurs after clk_get(), the corresponding resources should be
released.

Use devm_clk_get() to fix it.

Fixes: b5b2bdfc28 ("rtc: st: Add new driver for ST's LPC RTC")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/866af6adbc7454a7b4505eb6c28fbdc86ccff39e.1686251455.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-26 00:53:19 +02:00
Maxime Ripard
bd0a601fcb rtc: sun6i: Add a determine_rate hook
The Allwinner sun6i RTC clock implements a mux with a set_parent hook,
but doesn't provide a determine_rate implementation.

This is a bit odd, since set_parent() is there to, as its name implies,
change the parent of a clock. However, the most likely candidates to
trigger that parent change are either the assigned-clock-parents device
tree property or a call to clk_set_rate(), with determine_rate()
figuring out which parent is the best suited for a given rate.

The other trigger would be a call to clk_set_parent(), but it's far less
used, and it doesn't look like there's any obvious user for that clock.

Similarly, it doesn't look like the device tree using that clock driver
uses any of the assigned-clock properties on that clock.

So, the set_parent hook is effectively unused, possibly because of an
oversight. However, it could also be an explicit decision by the
original author to avoid any reparenting but through an explicit call to
clk_set_parent().

The latter case would be equivalent to setting the determine_rate
implementation to clk_hw_determine_rate_no_reparent(). Indeed, if no
determine_rate implementation is provided, clk_round_rate() (through
clk_core_round_rate_nolock()) will call itself on the parent if
CLK_SET_RATE_PARENT is set, and will not change the clock rate
otherwise.

And if it was an oversight, then we are at least explicit about our
behavior now and it can be further refined down the line.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Samuel Holland <samuel@sholland.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rtc@vger.kernel.org
Cc: linux-sunxi@lists.linux.dev
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221018-clk-range-checks-fixes-v4-45-971d5077e7d2@cerno.tech
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2023-06-08 18:39:32 -07:00
Alexandre Torgue
38e0689b27 rtc: stm32: remove dedicated wakeup management
There is no more needs to use a dedicated wake up interrupt for RTC as
EXTI block manages by itself now all interrupt lines.

Dedicated wakeup interrupt has been introduced with STM32 MP1 support
commit b72252b658 ("rtc: stm32: add stm32mp1 rtc support") because GIC &
EXTI interrupts were not yet linked in EXTI driver.

Removing this interrupt won't break compatibility with device trees which
do use two interrupts entries: it could only prevent wakeup from low power
modes on STM32MP1x, but platform power management is not yet available.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20230531122732.1515594-1-amelie.delaunay@foss.st.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-06 23:40:34 +02:00
Niklas Schnelle
8bb12adb21 rtc: add HAS_IOPORT dependencies
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to add HAS_IOPORT as dependency for
those drivers using them.

Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://lore.kernel.org/r/20230522105049.1467313-31-schnelle@linux.ibm.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-06 23:33:25 +02:00
Uwe Kleine-König
31b0cecb40 rtc: Switch i2c drivers back to use .probe()
After commit b8a1a4cd5a ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230505121136.1185653-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-06 23:29:37 +02:00
Krzysztof Kozlowski
b191189657 rtc: rv3032: constify pointers to hwmon_channel_info
Statically allocated array of pointers to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230511175609.282191-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-06 23:24:54 +02:00
Krzysztof Kozlowski
303b1e8944 rtc: isl12022: constify pointers to hwmon_channel_info
Statically allocated array of pointers to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230511175609.282191-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-06 23:24:54 +02:00
Krzysztof Kozlowski
d00caa55ce rtc: ds3232: constify pointers to hwmon_channel_info
Statically allocated array of pointers to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230511175609.282191-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-06 23:24:54 +02:00
Krzysztof Kozlowski
973ef08456 rtc: ab-eoz9: constify pointers to hwmon_channel_info
Statically allocated array of pointers to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230511175609.282191-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-06-06 23:24:54 +02:00
Sebastian Reichel
c20e8c5b12 mfd: rk808: Split into core and i2c
Split rk808 into a core and an i2c part in preparation for
SPI support.

Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> # for RTC
Tested-by: Diederik de Haas <didi.debian@cknow.org> # Rock64, Quartz64 Model A + B
Tested-by: Vincent Legoll <vincent.legoll@gmail.com> # Pine64 QuartzPro64
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230504173618.142075-6-sebastian.reichel@collabora.com
Signed-off-by: Lee Jones <lee@kernel.org>
2023-05-15 16:19:03 +01:00
Linus Torvalds
3af49062b0 - New Drivers
- Add support for  Renesas RZ/G2L MTU3
 
  - New Device Support
    - Add support for Lenovo Yoga Book X90F to Intel CHT WC
    - Add support for MAX5970 and MAX5978 to Simple MFD (I2C)
    - Add support for Meteor Lake PCH-S LPSS PCI to Intel LPSS PCI
    - Add support for AXP15060 PMIC to X-Powers PMIC collection
 
  - Remove Device Support
    - Remove support for Samsung 5M8751 and S5M8763 PMIC devices
 
  - New Functionality
    - Convert deprecated QCOM IRQ Chip to config registers
    - Add support for 32-bit address spaces to Renesas SMUs
 
  - Fix-ups
    - Make use of APIs / MACROs designed to simplify and demystify
    - Add / improve Device Tree bindings
    - Memory saving struct layout optimisations
    - Remove old / deprecated functionality
    - Factor out unassigned register addresses from ranges
    - Trivial: Spelling fixes, renames and coding style fixes
    - Rid 'defined but not used' warnings
    - Remove ineffective casts and pointer stubs
 
  - Bug Fixes
    - Fix incorrectly non-inverted mask/unmask IRQs on QCOM platforms
    - Remove MODULE_*() helpers from non-tristate drivers
    - Do not attempt to use out-of-range memory addresses associated with io_base
    - Provide missing export helpers
    - Fix remap bulk read optimisation fallout
    - Fix memory leak issues in error paths
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmRROFAACgkQUa+KL4f8
 d2E9OxAAtG4Ac/I8Cp/VsTGGn5/pxxMnY/AWmdfkexp8bDQSvavKKQZ2wEwgFaTW
 GVaOIuWpG82fdoIAm1SkLs/gjPbXLnDJlxv8UcYa3kMQik/iiwrWl4zN2KBZqIIX
 qdg7fZNVAhi/qjue1YCHxKjMB80kK2LBTfwly+mbOXWMOBmoDh957oFuNBAa9W/A
 QxN9ckU/yVMjpeZQ1M97g/nUu+lKMypcCNHm1hklzqbchqgUiefdYS6t+g7zBgff
 zvwrlo+Tt0oIef95+TVmiVQBWJ+Cf8ssZphyL9I5dUH1Ft16BsNZYVvD1Eur1WGf
 N7szGDBZoqK5I6uUJ2t4+xiE4Mh1r+TIoCZuSwpDWS5IRKiWxTTZ9aDTXTKbnVKK
 Ov5SA3cdC2McXa0NCXB/47HzDTXhffH0SQ9x3JKlba2crSKt7LicVhjeflMOcHw+
 HuTzg3imeMQriLVrVcvgce+YOcF3G/bFX9jvxnp8WFY+MLKuTYCGqoUfY6EF6r4i
 F0Y6DmYDBGX3rND+zvXDVMjS+RymYTSMtY9PKOXEdY1WU9E8GAHSKhrOCyCO3aIm
 PZRC2GAzGQ5fRCkyXusk0kxJqBBxu1My/wUQ9xRjdMKszFxEgVVFIY7KLwanY5vW
 2akDnwOtu+37G9Qm4h2TpQdNLGTldZbbFcWrYGKzbNrVOjYw824=
 =EBtX
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Drivers:
   - Add support for  Renesas RZ/G2L MTU3

  New Device Support:
   - Add support for Lenovo Yoga Book X90F to Intel CHT WC
   - Add support for MAX5970 and MAX5978 to Simple MFD (I2C)
   - Add support for Meteor Lake PCH-S LPSS PCI to Intel LPSS PCI
   - Add support for AXP15060 PMIC to X-Powers PMIC collection

  Remove Device Support:
   - Remove support for Samsung 5M8751 and S5M8763 PMIC devices

  New Functionality:
   - Convert deprecated QCOM IRQ Chip to config registers
   - Add support for 32-bit address spaces to Renesas SMUs

  Fix-ups:
   - Make use of APIs / MACROs designed to simplify and demystify
   - Add / improve Device Tree bindings
   - Memory saving struct layout optimisations
   - Remove old / deprecated functionality
   - Factor out unassigned register addresses from ranges
   - Trivial: Spelling fixes, renames and coding style fixes
   - Rid 'defined but not used' warnings
   - Remove ineffective casts and pointer stubs

  Bug Fixes:
   - Fix incorrectly non-inverted mask/unmask IRQs on QCOM platforms
   - Remove MODULE_*() helpers from non-tristate drivers
   - Do not attempt to use out-of-range memory addresses associated with io_base
   - Provide missing export helpers
   - Fix remap bulk read optimisation fallout
   - Fix memory leak issues in error paths"

* tag 'mfd-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (88 commits)
  dt-bindings: mfd: ti,j721e-system-controller: Add SoC chip ID
  leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver
  dt-bindings: mfd: qcom,spmi-pmic: Document flash LED controller
  dt-bindings: mfd: x-powers,axp152: Document the AXP15060 variant
  mfd: axp20x: Add support for AXP15060 PMIC
  dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant
  counter: rz-mtu3-cnt: Unlock on error in rz_mtu3_count_ceiling_write()
  dt-bindings: mfd: dlg,da9063: Document voltage monitoring
  dt-bindings: mfd: stm32: Remove unnecessary blank lines
  dt-bindings: mfd: qcom,spmi-pmic: Use generic ADC node name in examples
  dt-bindings: mfd: syscon: Add nuvoton,ma35d1-sys compatible
  MAINTAINERS: Add entries for Renesas RZ/G2L MTU3a counter driver
  counter: Add Renesas RZ/G2L MTU3a counter driver
  Documentation: ABI: sysfs-bus-counter: add cascade_counts_enable and external_input_phase_clock_select
  mfd: Add Renesas RZ/G2L MTU3a core driver
  dt-bindings: timer: Document RZ/G2L MTU3a bindings
  mfd: rsmu_i2c: Convert to i2c's .probe_new() again
  mfd: intel-lpss: Add Intel Meteor Lake PCH-S LPSS PCI IDs
  mfd: dln2: Fix memory leak in dln2_probe()
  mfd: axp20x: Fix axp288 writable-ranges
  ...
2023-05-02 10:41:31 -07:00
Linus Torvalds
3f2a1903af RTC for 6.4
Subsystem:
  - Convert to platform remove callback returning void
 
 Drivers:
  - meson-vrtc: fix a firmware display issue
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEBqsFVZXh8s/0O5JiY6TcMGxwOjIFAmRO7EYACgkQY6TcMGxw
 OjK++RAArlqzTIy/venVvWDk9QhN63gz+z+aaFSTLA1U342rhBYdXeGTrfvr0TYr
 EMhkZixJGk/fJkJw82fyAnkn1xTh56gavv2kKG3zc0O7fDi9X+jGd+OnbAVCyXbM
 u9ThjLSjI0euoU/0Df1fLFA8EUjHgeh8ORAo3SS2aTux1VCH3Q2Y9Hd1G2sBmyBE
 6rtYClzo9sCVDIKnKsHUw2T6PJxccmmt5y/C9GSK78M3m6UTLY2JFN8k8U1n0nx6
 sn9my+lX2tHj1UUnkPWHEAp5kfl8r+p/lE14UpNWlhx2N+pIVtgLkLy9Gs1Wijrr
 zAE6nq1dEWGNLhEfraXYvkfQHA8hTmjEJ3wXvXAI7n1t2MVSnp+UDfdJmZbkXziQ
 M4VNBno3zqm6IeN0Yshf20EEBrqIuuFuWatACuhkmXu9p+eusoXwh/stm/zK1I+Q
 UWOKgKWjrZ4eHG/bl/6PywIWQWNZluFxofS7V1DeayTwM+0S1RKXpat9Z534xF0Y
 mJCum17tBdTJlQNbvVrGjSUdpm8jsWLMQT7gYsRHCTOTLf2FOcJIH45hMTXZwaa9
 tz/+rUGBmJQuVSykvtn87evvr22vi73beqf/lLiWgGaRmQ1x9fHeSbp8cH9QvICZ
 ILRJOa70J7u94EncsyxUYYlxTfTSTyTSrBYfAj1QJwKmRBgyB6A=
 =i6d0
 -----END PGP SIGNATURE-----

Merge tag 'rtc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

Pull RTC updates from Alexandre Belloni:
 "Not much this cycle, there is the conversion to remove_new and many
  small fixes in drivers:

  Subsystem:
   - Convert to platform remove callback returning void

  Drivers:
   - meson-vrtc: fix a firmware display issue"

* tag 'rtc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (53 commits)
  rtc: armada38x: use devm_platform_ioremap_resource_byname()
  rtc: sunplus: use devm_platform_ioremap_resource_byname()
  rtc: jz4740: Make sure clock provider gets removed
  rtc: k3: handle errors while enabling wake irq
  rtc: meson-vrtc: Use ktime_get_real_ts64() to get the current time
  dt-bindings: rtc: Drop unneeded quotes
  rtc: pcf8523: remove unnecessary OR operation
  rtc: pcf8523: fix coding-style issues
  rtc: ds1390: mark OF related data as maybe unused
  rtc: omap: include header for omap_rtc_power_off_program prototype
  rtc: sun6i: Use of_property_present() for testing DT property presence
  rtc: mpfs: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE
  rtc: zynqmp: Convert to platform remove callback returning void
  rtc: xgene: Convert to platform remove callback returning void
  rtc: wm8350: Convert to platform remove callback returning void
  rtc: vt8500: Convert to platform remove callback returning void
  rtc: twl: Convert to platform remove callback returning void
  rtc: tps6586x: Convert to platform remove callback returning void
  rtc: tegra: Convert to platform remove callback returning void
  rtc: sunplus: Convert to platform remove callback returning void
  ...
2023-05-01 11:14:12 -07:00
Ye Xingchen
e99ab4abeb rtc: armada38x: use devm_platform_ioremap_resource_byname()
Convert platform_get_resource_byname(),devm_ioremap_resource() to a single
call to devm_platform_ioremap_resource_byname(), as this is exactly what
this function does.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202303221130316049449@zte.com.cn
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-04-28 08:07:23 +02:00
Ye Xingchen
916890539b rtc: sunplus: use devm_platform_ioremap_resource_byname()
Convert platform_get_resource_byname(),devm_ioremap_resource() to a single
call to devm_platform_ioremap_resource_byname(), as this is exactly what
this function does.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202303221131581039486@zte.com.cn
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-04-28 08:07:23 +02:00
Lars-Peter Clausen
c7a639dac8 rtc: jz4740: Make sure clock provider gets removed
The jz4740 RTC driver registers a clock provider, but never removes it.
This leaves a stale clock provider behind that references freed clocks when
the device is unbound.

Use the managed `devm_of_clk_add_hw_provider()` instead of
`of_clk_add_hw_provider()` to make sure the provider gets automatically
removed on unbind.

Fixes: 5ddfa148de ("rtc: jz4740: Register clock provider for the CLK32K pin")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20230409162544.16155-1-lars@metafoo.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-04-28 08:07:23 +02:00
David Virag
a3165abaa9 rtc: s5m: Drop S5M8763 support
The S5M8763 MFD has no device tree compatible, and since board file
support for it was removed, there's no way to use this MFD. After
removing the remaining code for it from the MFD driver, also remove
support for it in the s5m RTC driver, and all remaining references to
it.

Signed-off-by: David Virag <virag.david003@gmail.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230131183008.4451-3-virag.david003@gmail.com
2023-04-26 11:40:26 +01:00
Dhruva Gole
d31d7300eb rtc: k3: handle errors while enabling wake irq
Due to the potential failure of enable_irq_wake(), it would be better to
return error if it fails.

Fixes: b09d633575 ("rtc: Introduce ti-k3-rtc")
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
Link: https://lore.kernel.org/r/20230323085904.957999-1-d-gole@ti.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-23 10:50:59 +01:00
Martin Blumenstingl
0e6255fa3f rtc: meson-vrtc: Use ktime_get_real_ts64() to get the current time
The VRTC alarm register can be programmed with an amount of seconds
after which the SoC will be woken up by the VRTC timer again. We are
already converting the alarm time from meson_vrtc_set_alarm() to
"seconds since 1970". This means we also need to use "seconds since
1970" for the current time.

This fixes a problem where setting the alarm to one minute in the future
results in the firmware (which handles wakeup) to output (on the serial
console) that the system will be woken up in billions of seconds.
ktime_get_raw_ts64() returns the time since boot, not since 1970. Switch
to ktime_get_real_ts64() to fix the calculation of the alarm time and to
make the SoC wake up at the specified date/time. Also the firmware
(which manages suspend) now prints either 59 or 60 seconds until wakeup
(depending on how long it takes for the system to enter suspend).

Fixes: 6ef35398e8 ("rtc: Add Amlogic Virtual Wake RTC")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20230320212142.2355062-1-martin.blumenstingl@googlemail.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-21 21:15:10 +01:00
Javier Carrasco
dc87fad644 rtc: pcf8523: remove unnecessary OR operation
The value variable is initialized to 0 and it is not used to set any
other bits rather than the one that defines the capacitor value. Setting
this capacitor value is the only purpose of the function where the
variable is defined and therefore the OR operation does not apply as a
way to foresee functionality extensions either.

Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
Link: https://lore.kernel.org/r/20230315082021.2104452-3-javier.carrasco@wolfvision.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:23:54 +01:00
Javier Carrasco
b48cc753c0 rtc: pcf8523: fix coding-style issues
Minor modifications for coding-style correctness (tabs, spaces and blank
lines before and after brackets). In total 7 errors, 3 warnings and 1
check where removed from the checkpatch output without damaging code
readability.

Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
Link: https://lore.kernel.org/r/20230315082021.2104452-2-javier.carrasco@wolfvision.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:23:54 +01:00
Krzysztof Kozlowski
cca1e2f790 rtc: ds1390: mark OF related data as maybe unused
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  drivers/rtc/rtc-ds1390.c:216:34: error: ‘ds1390_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230311111226.250922-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:23:22 +01:00
Krzysztof Kozlowski
f69c2b5420 rtc: omap: include header for omap_rtc_power_off_program prototype
Non-static functions should have a prototype:

  drivers/rtc/rtc-omap.c:410:5: error: no previous prototype for ‘omap_rtc_power_off_program’ [-Werror=missing-prototypes]

Fixes: 6256f7f7f2 ("rtc: OMAP: Add support for rtc-only mode")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230311094021.79730-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:22:45 +01:00
Rob Herring
4d9890ac9d rtc: sun6i: Use of_property_present() for testing DT property presence
It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Link: https://lore.kernel.org/r/20230310144736.1547041-1-robh@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:19:55 +01:00
Conor Dooley
f12f0c7da3 rtc: mpfs: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE
As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the
use of such symbols on other architectures, convert the Microchip FPGA
RTC driver to use the new symbol.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230309204452.969574-5-conor@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:12:58 +01:00
Uwe Kleine-König
f45e5cfa73 rtc: zynqmp: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-42-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:19 +01:00
Uwe Kleine-König
257062d267 rtc: xgene: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-41-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
631aa2d919 rtc: wm8350: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230304133028.2135435-40-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
5b1064441f rtc: vt8500: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-39-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
fff118c9e8 rtc: twl: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-38-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
adebcc1c19 rtc: tps6586x: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-37-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
31c94505f4 rtc: tegra: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-36-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
d6f525040e rtc: sunplus: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-35-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
16324165ab rtc: stmp3xxx: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-34-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
54c2cb2797 rtc: stm32: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-33-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
25ffc856b3 rtc: spear: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-32-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
cf407e9f1a rtc: sa1100: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-31-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
9e6a2ad120 rtc: s3c: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-30-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
e55fbc80e9 rtc: rzn1: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20230304133028.2135435-29-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00
Uwe Kleine-König
0824a15b68 rtc: rtd119x: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230304133028.2135435-28-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2023-03-17 23:03:18 +01:00