Re: [PATCHv4 07/13] mfd: rk808: split into core and i2c

From: Lee Jones
Date: Mon Oct 31 2022 - 09:56:39 EST


On Thu, 20 Oct 2022, Sebastian Reichel wrote:

> Split rk808 into a core and an i2c part in preperation for
> SPI support.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
> ---
> drivers/clk/Kconfig | 2 +-
> drivers/input/misc/Kconfig | 2 +-
> drivers/mfd/Kconfig | 7 +-
> drivers/mfd/Makefile | 3 +-
> drivers/mfd/{rk808.c => rk8xx-core.c} | 210 ++++----------------------
> drivers/mfd/rk8xx-i2c.c | 209 +++++++++++++++++++++++++
> drivers/pinctrl/Kconfig | 2 +-
> drivers/power/supply/Kconfig | 2 +-
> drivers/regulator/Kconfig | 2 +-
> drivers/rtc/Kconfig | 2 +-
> include/linux/mfd/rk808.h | 6 +
> sound/soc/codecs/Kconfig | 2 +-
> 12 files changed, 263 insertions(+), 186 deletions(-)
> rename drivers/mfd/{rk808.c => rk8xx-core.c} (75%)
> create mode 100644 drivers/mfd/rk8xx-i2c.c
>
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index d79905f3e174..8448d616b9aa 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -83,7 +83,7 @@ config COMMON_CLK_MAX9485
>
> config COMMON_CLK_RK808
> tristate "Clock driver for RK805/RK808/RK809/RK817/RK818"
> - depends on MFD_RK808
> + depends on MFD_RK8XX
> help
> This driver supports RK805, RK809 and RK817, RK808 and RK818 crystal oscillator clock.
> These multi-function devices have two fixed-rate oscillators, clocked at 32KHz each.
> diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
> index 9f088900f863..1899afeaec47 100644
> --- a/drivers/input/misc/Kconfig
> +++ b/drivers/input/misc/Kconfig
> @@ -588,7 +588,7 @@ config INPUT_PWM_VIBRA
>
> config INPUT_RK805_PWRKEY
> tristate "Rockchip RK805 PMIC power key support"
> - depends on MFD_RK808
> + depends on MFD_RK8XX
> help
> Select this option to enable power key driver for RK805.
>
> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> index 8b93856de432..8e3de443cc3d 100644
> --- a/drivers/mfd/Kconfig
> +++ b/drivers/mfd/Kconfig
> @@ -1201,12 +1201,17 @@ config MFD_RC5T583
> Additional drivers must be enabled in order to use the
> different functionality of the device.
>
> -config MFD_RK808
> +config MFD_RK8XX
> + bool
> + select MFD_CORE
> +
> +config MFD_RK8XX_I2C
> tristate "Rockchip RK805/RK808/RK809/RK817/RK818 Power Management Chip"
> depends on I2C && OF
> select MFD_CORE
> select REGMAP_I2C
> select REGMAP_IRQ
> + select MFD_RK8XX
> help
> If you say yes here you get support for the RK805, RK808, RK809,
> RK817 and RK818 Power Management chips.
> diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> index 7ed3ef4a698c..edf84e870f98 100644
> --- a/drivers/mfd/Makefile
> +++ b/drivers/mfd/Makefile
> @@ -223,7 +223,8 @@ obj-$(CONFIG_MFD_PALMAS) += palmas.o
> obj-$(CONFIG_MFD_VIPERBOARD) += viperboard.o
> obj-$(CONFIG_MFD_NTXEC) += ntxec.o
> obj-$(CONFIG_MFD_RC5T583) += rc5t583.o rc5t583-irq.o
> -obj-$(CONFIG_MFD_RK808) += rk808.o
> +obj-$(CONFIG_MFD_RK8XX) += rk8xx-core.o
> +obj-$(CONFIG_MFD_RK8XX_I2C) += rk8xx-i2c.o
> obj-$(CONFIG_MFD_RN5T618) += rn5t618.o
> obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o sec-irq.o
> obj-$(CONFIG_MFD_SYSCON) += syscon.o
> diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk8xx-core.c
> similarity index 75%
> rename from drivers/mfd/rk808.c
> rename to drivers/mfd/rk8xx-core.c
> index b154ca96d812..098506972710 100644
> --- a/drivers/mfd/rk808.c
> +++ b/drivers/mfd/rk8xx-core.c
> @@ -3,16 +3,9 @@
> * MFD core driver for Rockchip RK808/RK818
> *
> * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd
> - *
> - * Author: Chris Zhong <zyw@xxxxxxxxxxxxxx>
> - * Author: Zhang Qing <zhangqing@xxxxxxxxxxxxxx>
> - *
> * Copyright (C) 2016 PHYTEC Messtechnik GmbH
> - *
> - * Author: Wadim Egorov <w.egorov@xxxxxxxxx>
> */

The patch and the premise behind it look reasonable.

What's the reason for taking out the Author tags?

--
Lee Jones [李琼斯]