mfd: intel_soc_pmic_crc: Merge Intel PMIC core to crc
PATCH 1/9 mfd: intel_soc_pmic_crc: Merge Intel PMIC core to crc
The core part is misleading since its only purpose to serve Crystal Cove PMIC, although for couple of different platforms. Merge core part into crc one.
Advantages among others are:
- speed up a compilation and build
- decreasing the code base
- reducing noise in the namespace by making some data static and const
--- drivers/mfd/Makefile | 3 +- drivers/mfd/intel_soc_pmic_core.c | 160 ----------------------------- drivers/mfd/intel_soc_pmic_core.h | 25 ----- drivers/mfd/intel_soc_pmic_crc.c | 162 ++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 193 deletions(-) delete mode 100644 drivers/mfd/intel_soc_pmic_core.c delete mode 100644 drivers/mfd/intel_soc_pmic_core.h
drivers/mfd/Makefile +1 -2
@@ -236,8 +236,7 @@ obj-$(CONFIG_MFD_RT4831) += rt4831.o obj-$(CONFIG_MFD_RT5033) += rt5033.o obj-$(CONFIG_MFD_SKY81452) += sky81452.o -intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o -obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o +obj-$(CONFIG_INTEL_SOC_PMIC) += intel_soc_pmic_crc.o obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC) += intel_soc_pmic_bxtwc.o obj-$(CONFIG_INTEL_SOC_PMIC_CHTWC) += intel_soc_pmic_chtwc.o obj-$(CONFIG_INTEL_SOC_PMIC_CHTDC_TI) += intel_soc_pmic_chtdc_ti.o
drivers/mfd/intel_soc_pmic_core.c deleted +0 -160
160 lines not on this page · raw message
drivers/mfd/intel_soc_pmic_core.h deleted +0 -25
@@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* Intel SoC PMIC MFD Driver -* -* Copyright (C) 2012-2014 Intel Corporation. All rights reserved. -* -* Author: Yang, Bin <[email protected]> -* Author: Zhu, Lejun <[email protected]> -*/ - -#ifndef __INTEL_SOC_PMIC_CORE_H__ -#define __INTEL_SOC_PMIC_CORE_H__ - -struct intel_soc_pmic_config { -unsigned long irq_flags; -struct mfd_cell *cell_dev; -int n_cell_devs; -const struct regmap_config *regmap_config; -const struct regmap_irq_chip *irq_chip; -}; - -extern struct intel_soc_pmic_config intel_soc_pmic_config_byt_crc; -extern struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc; - -#endif /* __INTEL_SOC_PMIC_CORE_H__ */
drivers/mfd/intel_soc_pmic_crc.c +156 -6
191 lines not on this page · raw message
Signature · 1 line
2.35.1
PATCH 2/9 mfd: intel_soc_pmic: Move non-Intel Makefile entries to their own group
It looks like a random position for couple of Makefile entries that are disrupting Intel PMIC group. Move them to their own group.
--- drivers/mfd/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/mfd/Makefile +4 -3
@@ -172,6 +172,10 @@ obj-$(CONFIG_MFD_MAX8998) += max8998.o max8998-irq.o obj-$(CONFIG_MFD_MP2629) += mp2629.o +obj-$(CONFIG_MFD_MT6360) += mt6360-core.o +mt6397-objs := mt6397-core.o mt6397-irq.o mt6358-irq.o +obj-$(CONFIG_MFD_MT6397) += mt6397.o + pcf50633-objs := pcf50633-core.o pcf50633-irq.o obj-$(CONFIG_MFD_PCF50633) += pcf50633.o obj-$(CONFIG_PCF50633_ADC) += pcf50633-adc.o
@@ -240,9 +244,6 @@ obj-$(CONFIG_INTEL_SOC_PMIC) += intel_soc_pmic_crc.o obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC) += intel_soc_pmic_bxtwc.o obj-$(CONFIG_INTEL_SOC_PMIC_CHTWC) += intel_soc_pmic_chtwc.o obj-$(CONFIG_INTEL_SOC_PMIC_CHTDC_TI) += intel_soc_pmic_chtdc_ti.o -obj-$(CONFIG_MFD_MT6360) += mt6360-core.o -mt6397-objs := mt6397-core.o mt6397-irq.o mt6358-irq.o -obj-$(CONFIG_MFD_MT6397) += mt6397.o obj-$(CONFIG_INTEL_SOC_PMIC_MRFLD) += intel_soc_pmic_mrfld.o obj-$(CONFIG_MFD_ALTERA_A10SR) += altera-a10sr.o
Signature · 1 line
2.35.1
Re: [PATCH v1 2/9] mfd: intel_soc_pmic: Move non-Intel Makefile entries to their own group
Quoted 7 lines · Andy Shevchenko
It looks like a random position for couple of
Makefileentries that are disrupting Intel PMIC group. Move them to their own group.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
For my own reference (apply this as-is to your sign-off block):
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 3/9 mfd: intel_soc_pmic_crc: Use devm_regmap_add_irq_chip()
In reply to Andy ShevchenkoUse devm_regmap_add_irq_chip() to simplify the code.
While at it, replace -1 magic parameter by PLATFORM_DEVID_NONE when calling mfd_add_devices().
Note, the mfd_add_devices() left in non-devm variant here due to potentially increased churn while wrapping pwm_remove_table().
--- drivers/mfd/intel_soc_pmic_crc.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-)
drivers/mfd/intel_soc_pmic_crc.c +5 -19
@@ -189,10 +189,9 @@ static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c, pmic->irq = i2c->irq; - ret =regmap_add_irq_chip (pmic->regmap, pmic->irq, - config->irq_flags |IRQF_ONESHOT , -0 , config->irq_chip, - &pmic->irq_chip_data); + ret =devm_regmap_add_irq_chip (dev, pmic->regmap, pmic->irq, + config->irq_flags |IRQF_ONESHOT , +0 , config->irq_chip, &pmic->irq_chip_data);if (ret)return ret;
@@ -207,25 +206,12 @@ static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c,irq_domain_update_bus_token (regmap_irq_get_domain (pmic->irq_chip_data),DOMAIN_BUS_NEXUS ); - ret =mfd_add_devices (dev,-1 , config->cell_dev, - config->n_cell_devs,NULL ,0 , -regmap_irq_get_domain (pmic->irq_chip_data)); -if (ret) - goto err_del_irq_chip; - -return 0 ; - -err_del_irq_chip: -regmap_del_irq_chip (pmic->irq, pmic->irq_chip_data); -return ret; +return mfd_add_devices (dev,PLATFORM_DEVID_NONE , config->cell_dev, config->n_cell_devs, +NULL ,0 ,regmap_irq_get_domain (pmic->irq_chip_data)); }static int intel_soc_pmic_i2c_remove (struct i2c_client *i2c) { -struct intel_soc_pmic *pmic =dev_get_drvdata (&i2c->dev); - -regmap_del_irq_chip (pmic->irq, pmic->irq_chip_data); -/* remove crc-pwm lookup table */ pwm_remove_table (crc_pwm_lookup,ARRAY_SIZE (crc_pwm_lookup));
Signature · 1 line
2.35.1
Re: [PATCH v1 3/9] mfd: intel_soc_pmic_crc: Use devm_regmap_add_irq_chip()
Quoted 5 lines · Andy Shevchenko
Use
devm_regmap_add_irq_chip()to simplify the code.While at it, replace -1 magic parameter by
PLATFORM_DEVID_NONEwhen callingmfd_add_devices().
Quoted 7 lines
Note, the
mfd_add_devices()left in non-devm variant here due to potentially increased churn while wrappingpwm_remove_table().Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/intel_soc_pmic_crc.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-)
For my own reference (apply this as-is to your sign-off block):
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 4/9 mfd: intel_soc_pmic_crc: Convert to use i2c_get/set_clientdata()
In reply to Andy ShevchenkoWe have the specific helpers for I2C device to set and get its driver data. Convert driver to use them instead of open coded variants.
--- drivers/mfd/intel_soc_pmic_crc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/intel_soc_pmic_crc.c +2 -2
@@ -181,7 +181,7 @@ static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c,if (!pmic)return -ENOMEM ; -dev_set_drvdata (dev, pmic); +i2c_set_clientdata (i2c, pmic); pmic->regmap =devm_regmap_init_i2c (i2c, config->regmap_config);if (IS_ERR (pmic->regmap))
@@ -222,7 +222,7 @@ static int intel_soc_pmic_i2c_remove(struct i2c_client *i2c)static void intel_soc_pmic_shutdown (struct i2c_client *i2c) { -struct intel_soc_pmic *pmic =dev_get_drvdata (&i2c->dev); +struct intel_soc_pmic *pmic =i2c_get_clientdata (i2c);disable_irq (pmic->irq);
Signature · 1 line
2.35.1
Re: [PATCH v1 4/9] mfd: intel_soc_pmic_crc: Convert to use i2c_get/set_clientdata()
Quoted 7 lines · Andy Shevchenko
We have the specific helpers for I2C device to set and get its driver data. Convert driver to use them instead of open coded variants.
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/intel_soc_pmic_crc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
For my own reference (apply this as-is to your sign-off block):
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 5/9 mfd: intel_soc_pmic_crc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc
In reply to Andy ShevchenkoLetting the compiler remove these functions when the kernel is built without CONFIG_PM_SLEEP support is simpler and less error prone than the use of #ifdef based kernel configuration guards.
--- drivers/mfd/intel_soc_pmic_crc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/mfd/intel_soc_pmic_crc.c +2 -5
@@ -229,7 +229,6 @@ static void intel_soc_pmic_shutdown(struct i2c_client *i2c)return ; } -#if defined(CONFIG_PM_SLEEP )static int intel_soc_pmic_suspend (struct device *dev) {struct intel_soc_pmic *pmic =dev_get_drvdata (dev);
@@ -247,10 +246,8 @@ static int intel_soc_pmic_resume(struct device *dev)return 0 ; } -#endif -static SIMPLE_DEV_PM_OPS(intel_soc_pmic_pm_ops, intel_soc_pmic_suspend, - intel_soc_pmic_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(crystal_cove_pm_ops, intel_soc_pmic_suspend, intel_soc_pmic_resume);static const struct i2c_device_id intel_soc_pmic_i2c_id[] = { { }
@@ -268,7 +265,7 @@ MODULE_DEVICE_TABLE(acpi, intel_soc_pmic_acpi_match);static struct i2c_driver intel_soc_pmic_i2c_driver = { .driver = { .name ="intel_soc_pmic_i2c" , - .pm = &intel_soc_pmic_pm_ops, + .pm =pm_sleep_ptr (&crystal_cove_pm_ops), .acpi_match_table =ACPI_PTR (intel_soc_pmic_acpi_match), }, .probe = intel_soc_pmic_i2c_probe,
Signature · 1 line
2.35.1
Lee Jones
AppliedRe: [PATCH v1 5/9] mfd: intel_soc_pmic_crc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc
Quoted 8 lines · Andy Shevchenko
Letting the compiler remove these functions when the kernel is built without
CONFIG_PM_SLEEPsupport is simpler and less error prone than the use of #ifdef based kernel configuration guards.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/intel_soc_pmic_crc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v1 5/9] mfd: intel_soc_pmic_crc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc
Quoted 6 lines · Lee Jones
Quoted 4 lines · Andy Shevchenko
Letting the compiler remove these functions when the kernel is built without
CONFIG_PM_SLEEPsupport is simpler and less error prone than the use of #ifdef based kernel configuration guards.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/intel_soc_pmic_crc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)Applied, thanks.
Sorry, wrong key combo - long day:
For my own reference (apply this as-is to your sign-off block):
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 6/9 mfd: intel_soc_pmic_crc: Drop redundant ACPI_PTR() and ifdeffery
In reply to Andy ShevchenkoThe driver depends on ACPI, ACPI_PTR() resolution is always the same. Otherwise a compiler may produce a warning.
That said, the rule of thumb either ugly ifdeffery with ACPI_PTR or none should be used in a driver.
--- drivers/mfd/Kconfig | 4 ++-- drivers/mfd/intel_soc_pmic_crc.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/mfd/Kconfig +2 -2
@@ -588,8 +588,8 @@ config LPC_SCH config INTEL_SOC_PMIC bool "Support for Crystal Cove PMIC" - depends on ACPI && HAS_IOMEM && I2C=y && GPIOLIB && COMMON_CLK - depends on X86 || COMPILE_TEST + depends on HAS_IOMEM && I2C=y && GPIOLIB && COMMON_CLK + depends on (X86 && ACPI) || COMPILE_TEST depends on I2C_DESIGNWARE_PLATFORM=y select MFD_CORE select REGMAP_I2C
drivers/mfd/intel_soc_pmic_crc.c +2 -4
@@ -8,9 +8,9 @@* Author: Zhu, Lejun <[email protected]> */ -#include <linux/acpi.h> #include <linux/i2c.h> #include <linux/interrupt.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/mfd/core.h> #include <linux/mfd/intel_soc_pmic.h>
@@ -254,19 +254,17 @@ static const struct i2c_device_id intel_soc_pmic_i2c_id[] = { };MODULE_DEVICE_TABLE (i2c, intel_soc_pmic_i2c_id); -#if defined(CONFIG_ACPI )static const struct acpi_device_id intel_soc_pmic_acpi_match[] = { {"INT33FD" }, { }, };MODULE_DEVICE_TABLE (acpi, intel_soc_pmic_acpi_match); -#endif static struct i2c_driver intel_soc_pmic_i2c_driver = { .driver = { .name ="intel_soc_pmic_i2c" , .pm =pm_sleep_ptr (&crystal_cove_pm_ops), - .acpi_match_table =ACPI_PTR (intel_soc_pmic_acpi_match), + .acpi_match_table = intel_soc_pmic_acpi_match, }, .probe = intel_soc_pmic_i2c_probe, .remove = intel_soc_pmic_i2c_remove,
Signature · 1 line
2.35.1
Lee Jones
AppliedRe: [PATCH v1 6/9] mfd: intel_soc_pmic_crc: Drop redundant ACPI_PTR() and ifdeffery
Quoted 11 lines · Andy Shevchenko
The driver depends on ACPI,
ACPI_PTR()resolution is always the same. Otherwise a compiler may produce a warning.That said, the rule of thumb either ugly ifdeffery with
ACPI_PTRor none should be used in a driver.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/Kconfig | 4 ++-- drivers/mfd/intel_soc_pmic_crc.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-)
Applied, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v1 6/9] mfd: intel_soc_pmic_crc: Drop redundant ACPI_PTR() and ifdeffery
Quoted 8 lines · Lee Jones
Quoted 6 lines · Andy Shevchenko
The driver depends on ACPI,
ACPI_PTR()resolution is always the same. Otherwise a compiler may produce a warning.That said, the rule of thumb either ugly ifdeffery with
ACPI_PTRor none should be used in a driver.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/Kconfig | 4 ++-- drivers/mfd/intel_soc_pmic_crc.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-)Applied, thanks.
Sorry, wrong key combo - long day:
For my own reference (apply this as-is to your sign-off block):
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 7/9 mfd: intel_soc_pmic_crc: Convert driver to use ->probe_new()
In reply to Andy ShevchenkoUse the ->probe_new() callback.
The driver does not use const struct i2c_device_id * argument, so convert it to utilise the simplified I²C driver registration.
--- drivers/mfd/intel_soc_pmic_crc.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/mfd/intel_soc_pmic_crc.c +2 -9
@@ -164,8 +164,7 @@ static const struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc = { .irq_chip = &crystal_cove_irq_chip, }; -static int intel_soc_pmic_i2c_probe (struct i2c_client *i2c, -const struct i2c_device_id *i2c_id) +static int intel_soc_pmic_i2c_probe (struct i2c_client *i2c) {const struct intel_soc_pmic_config *config;struct device *dev = &i2c->dev;
@@ -249,11 +248,6 @@ static int intel_soc_pmic_resume(struct device *dev) static DEFINE_SIMPLE_DEV_PM_OPS(crystal_cove_pm_ops, intel_soc_pmic_suspend, intel_soc_pmic_resume); -static const struct i2c_device_id intel_soc_pmic_i2c_id[] = { - { } -}; -MODULE_DEVICE_TABLE (i2c, intel_soc_pmic_i2c_id); -static const struct acpi_device_id intel_soc_pmic_acpi_match[] = { {"INT33FD" }, { },
@@ -266,9 +260,8 @@ static struct i2c_driver intel_soc_pmic_i2c_driver = { .pm = pm_sleep_ptr(&crystal_cove_pm_ops), .acpi_match_table = intel_soc_pmic_acpi_match, }, - .probe = intel_soc_pmic_i2c_probe, + .probe_new = intel_soc_pmic_i2c_probe, .remove = intel_soc_pmic_i2c_remove, - .id_table = intel_soc_pmic_i2c_id, .shutdown = intel_soc_pmic_shutdown, };
Signature · 1 line
2.35.1
Re: [PATCH v1 7/9] mfd: intel_soc_pmic_crc: Convert driver to use ->probe_new()
Quoted 9 lines · Andy Shevchenko
Use the ->probe_new() callback.
The driver does not use const struct
i2c_device_id* argument, so convert it to utilise the simplified I²C driver registration.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/intel_soc_pmic_crc.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
For my own reference (apply this as-is to your sign-off block):
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 8/9 mfd: intel_soc_pmic_crc: Replace intel_soc_pmic with crystal_cove
In reply to Andy ShevchenkoTo reflect the point that this driver is only for one type of the PMICs, replace intel_soc_pmic with crystal_cove (avoid using crc for possible namespace collisions with CRC library APIs).
Note, also rename the driver name since we don't expect any user that enumerates by it, only ACPI known so far.
--- drivers/mfd/intel_soc_pmic_crc.c | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-)
drivers/mfd/intel_soc_pmic_crc.c +21 -21
@@ -140,7 +140,7 @@ static struct pwm_lookup crc_pwm_lookup[] = { PWM_LOOKUP("crystal_cove_pwm", 0, "0000:00:02.0", "pwm_pmic_backlight", 0, PWM_POLARITY_NORMAL), }; -struct intel_soc_pmic_config { +struct crystal_cove_config {unsigned long irq_flags;struct mfd_cell *cell_dev;int n_cell_devs;
@@ -148,7 +148,7 @@ struct intel_soc_pmic_config {const struct regmap_irq_chip *irq_chip; }; -static const struct intel_soc_pmic_config intel_soc_pmic_config_byt_crc = { +static const struct crystal_cove_config crystal_cove_config_byt_crc = { .irq_flags =IRQF_TRIGGER_RISING , .cell_dev = crystal_cove_byt_dev, .n_cell_devs =ARRAY_SIZE (crystal_cove_byt_dev),
@@ -156,7 +156,7 @@ static const struct intel_soc_pmic_config intel_soc_pmic_config_byt_crc = { .irq_chip = &crystal_cove_irq_chip, }; -static const struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc = { +static const struct crystal_cove_config crystal_cove_config_cht_crc = { .irq_flags =IRQF_TRIGGER_RISING , .cell_dev = crystal_cove_cht_dev, .n_cell_devs =ARRAY_SIZE (crystal_cove_cht_dev),
@@ -164,17 +164,17 @@ static const struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc = { .irq_chip = &crystal_cove_irq_chip, }; -static int intel_soc_pmic_i2c_probe (struct i2c_client *i2c) +static int crystal_cove_i2c_probe (struct i2c_client *i2c) { -const struct intel_soc_pmic_config *config; +const struct crystal_cove_config *config;struct device *dev = &i2c->dev;struct intel_soc_pmic *pmic;int ret;if (soc_intel_is_byt ()) - config = &intel_soc_pmic_config_byt_crc; + config = &crystal_cove_config_byt_crc;else - config = &intel_soc_pmic_config_cht_crc; + config = &crystal_cove_config_cht_crc; pmic =devm_kzalloc (dev,sizeof (*pmic),GFP_KERNEL );if (!pmic)
@@ -209,7 +209,7 @@ static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c) NULL, 0, regmap_irq_get_domain(pmic->irq_chip_data)); } -static int intel_soc_pmic_i2c_remove (struct i2c_client *i2c) +static int crystal_cove_i2c_remove (struct i2c_client *i2c) {/* remove crc-pwm lookup table */ pwm_remove_table (crc_pwm_lookup,ARRAY_SIZE (crc_pwm_lookup));
@@ -219,7 +219,7 @@ static int intel_soc_pmic_i2c_remove(struct i2c_client *i2c)return 0 ; } -static void intel_soc_pmic_shutdown (struct i2c_client *i2c) +static void crystal_cove_shutdown (struct i2c_client *i2c) {struct intel_soc_pmic *pmic =i2c_get_clientdata (i2c);
@@ -228,7 +228,7 @@ static void intel_soc_pmic_shutdown(struct i2c_client *i2c)return ; } -static int intel_soc_pmic_suspend (struct device *dev) +static int crystal_cove_suspend (struct device *dev) {struct intel_soc_pmic *pmic =dev_get_drvdata (dev);
@@ -237,7 +237,7 @@ static int intel_soc_pmic_suspend(struct device *dev)return 0 ; } -static int intel_soc_pmic_resume (struct device *dev) +static int crystal_cove_resume (struct device *dev) {struct intel_soc_pmic *pmic =dev_get_drvdata (dev);
@@ -246,26 +246,26 @@ static int intel_soc_pmic_resume(struct device *dev)return 0 ; } -static DEFINE_SIMPLE_DEV_PM_OPS(crystal_cove_pm_ops, intel_soc_pmic_suspend, intel_soc_pmic_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(crystal_cove_pm_ops, crystal_cove_suspend, crystal_cove_resume); -static const struct acpi_device_id intel_soc_pmic_acpi_match[] = { +static const struct acpi_device_id crystal_cove_acpi_match[] = { {"INT33FD" }, { }, }; -MODULE_DEVICE_TABLE (acpi, intel_soc_pmic_acpi_match); +MODULE_DEVICE_TABLE (acpi, crystal_cove_acpi_match); -static struct i2c_driver intel_soc_pmic_i2c_driver = { +static struct i2c_driver crystal_cove_i2c_driver = { .driver = { - .name ="intel_soc_pmic_i2c" , + .name ="crystal_cove_i2c" , .pm =pm_sleep_ptr (&crystal_cove_pm_ops), - .acpi_match_table = intel_soc_pmic_acpi_match, + .acpi_match_table = crystal_cove_acpi_match, }, - .probe_new = intel_soc_pmic_i2c_probe, - .remove = intel_soc_pmic_i2c_remove, - .shutdown = intel_soc_pmic_shutdown, + .probe_new = crystal_cove_i2c_probe, + .remove = crystal_cove_i2c_remove, + .shutdown = crystal_cove_shutdown, }; -module_i2c_driver (intel_soc_pmic_i2c_driver); +module_i2c_driver (crystal_cove_i2c_driver);MODULE_DESCRIPTION ("I2C driver for Intel SoC PMIC" );MODULE_LICENSE ("GPL v2" );
Signature · 1 line
2.35.1
Re: [PATCH v1 8/9] mfd: intel_soc_pmic_crc: Replace intel_soc_pmic with crystal_cove
Quoted 11 lines · Andy Shevchenko
To reflect the point that this driver is only for one type of the PMICs, replace
intel_soc_pmicwithcrystal_cove(avoid using crc for possible namespace collisions with CRC library APIs).Note, also rename the driver name since we don't expect any user that enumerates by it, only ACPI known so far.
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/intel_soc_pmic_crc.c | 42 ++++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-)
For my own reference (apply this as-is to your sign-off block):
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH 9/9 mfd: intel_soc_pmic_crc: Update the copyright year
In reply to Andy ShevchenkoUpdate the copyright year to be 2012-2014, 2022.
--- drivers/mfd/intel_soc_pmic_crc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/intel_soc_pmic_crc.c +1 -1
@@ -2,7 +2,7 @@/* * Device access for Crystal Cove PMIC * -* Copyright (C) 2012-2014 Intel Corporation. All rights reserved. +* Copyright (C) 2012-2014, 2022 Intel Corporation. All rights reserved. * * Author: Yang, Bin <[email protected]> * Author: Zhu, Lejun <[email protected]>
Signature · 1 line
2.35.1
Re: [PATCH v1 9/9] mfd: intel_soc_pmic_crc: Update the copyright year
Quoted 12 lines · Andy Shevchenko
Update the copyright year to be 2012-2014, 2022.
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/intel_soc_pmic_crc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mfd/intel_soc_pmic_crc.c +0
-0
drivers/mfd/intel_soc_pmic_crc.c line 5
Quoted 5 lines
drivers/mfd/intel_soc_pmic_crc.c +1
-1@@ -2,7 +2,7 @@/* * Device access for Crystal Cove PMIC * -* Copyright (C) 2012-2014 Intel Corporation. All rights reserved. +* Copyright (C) 2012-2014, 2022 Intel Corporation. All rights reserved.
Same question as before.
What happens between these dates?
Quoted 2 lines
drivers/mfd/intel_soc_pmic_crc.c +0
-0* Author: Yang, Bin <[email protected]> * Author: Zhu, Lejun <[email protected]>
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v1 9/9] mfd: intel_soc_pmic_crc: Update the copyright year
Quoted 8 lines · Lee Jones
Quoted 2 lines · Andy Shevchenko
- * Copyright (C) 2012-2014 Intel Corporation. All rights reserved.
+ * Copyright (C) 2012-2014, 2022 Intel Corporation. All rights reserved.Same question as before.
What happens between these dates?
Same answer as before. I believe nothing (which may justify Copyright update) happened.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi,
Thank you for this series, cleaning this up is long overdue.
The entire series looks good to me:
for the series.
Regards,
Hans
p.s.
Maybe do a follow up renaming CONFIG_INTEL_SOC_PMIC to CONFIG_INTEL_SOC_PMIC_CRC and also change the module name from intel-soc-pmic to intel-soc-pmic-crc ?
I don't expect any userspace dependencies on the module-name (there are no module parameters) so this should be fine.
Quoted 427 lines · Andy Shevchenko
The core part is misleading since its only purpose to serve Crystal Cove PMIC, although for couple of different platforms. Merge core part into crc one.
Advantages among others are:
- speed up a compilation and build
- decreasing the code base
- reducing noise in the namespace by making some data static and constSigned-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/Makefile | 3 +- drivers/mfd/intel_soc_pmic_core.c | 160 ----------------------------- drivers/mfd/intel_soc_pmic_core.h | 25 ----- drivers/mfd/intel_soc_pmic_crc.c | 162 ++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 193 deletions(-) delete mode 100644 drivers/mfd/intel_soc_pmic_core.c delete mode 100644 drivers/mfd/intel_soc_pmic_core.hdrivers/mfd/Makefile +1
-2@@ -236,8 +236,7 @@ obj-$(CONFIG_MFD_RT4831) += rt4831.o obj-$(CONFIG_MFD_RT5033) += rt5033.o obj-$(CONFIG_MFD_SKY81452) += sky81452.o -intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o -obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o +obj-$(CONFIG_INTEL_SOC_PMIC) += intel_soc_pmic_crc.o obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC) += intel_soc_pmic_bxtwc.o obj-$(CONFIG_INTEL_SOC_PMIC_CHTWC) += intel_soc_pmic_chtwc.o obj-$(CONFIG_INTEL_SOC_PMIC_CHTDC_TI) += intel_soc_pmic_chtdc_ti.odrivers/mfd/intel_soc_pmic_core.c deleted +0
-160@@ -1,160 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* -* Intel SoC PMIC MFD Driver -* -* Copyright (C) 2013, 2014 Intel Corporation. All rights reserved. -* -* Author: Yang, Bin <[email protected]> -* Author: Zhu, Lejun <[email protected]> -*/ - -#include <linux/acpi.h> -#include <linux/i2c.h> -#include <linux/interrupt.h> -#include <linux/module.h> -#include <linux/mfd/core.h> -#include <linux/mfd/intel_soc_pmic.h> -#include <linux/platform_data/x86/soc.h> -#include <linux/pwm.h> -#include <linux/regmap.h> - -#include "intel_soc_pmic_core.h" - -/* PWM consumed by the Intel GFX */ -static struct pwm_lookup crc_pwm_lookup[] = { -PWM_LOOKUP ("crystal_cove_pwm" ,0 ,"0000:00:02.0" ,"pwm_pmic_backlight" ,0 ,PWM_POLARITY_NORMAL ), -}; - -static int intel_soc_pmic_i2c_probe (struct i2c_client *i2c, -const struct i2c_device_id *i2c_id) -{ -struct device *dev = &i2c->dev; -struct intel_soc_pmic_config *config; -struct intel_soc_pmic *pmic; -int ret; - -if (soc_intel_is_byt ()) - config = &intel_soc_pmic_config_byt_crc; -else - config = &intel_soc_pmic_config_cht_crc; - - pmic =devm_kzalloc (dev,sizeof (*pmic),GFP_KERNEL ); -if (!pmic) -return -ENOMEM ; - -dev_set_drvdata (dev, pmic); - - pmic->regmap =devm_regmap_init_i2c (i2c, config->regmap_config); -if (IS_ERR (pmic->regmap)) -return PTR_ERR (pmic->regmap); - - pmic->irq = i2c->irq; - - ret =regmap_add_irq_chip (pmic->regmap, pmic->irq, - config->irq_flags |IRQF_ONESHOT , -0 , config->irq_chip, - &pmic->irq_chip_data); -if (ret) -return ret; - - ret =enable_irq_wake (pmic->irq); -if (ret) -dev_warn (dev,"Can't enable IRQ as wake source: %d\n" , ret); - -/* Add lookup table for crc-pwm */ -pwm_add_table (crc_pwm_lookup,ARRAY_SIZE (crc_pwm_lookup)); - -/* To distuingish this domain from the GPIO/charger's irqchip domains */ -irq_domain_update_bus_token (regmap_irq_get_domain (pmic->irq_chip_data), -DOMAIN_BUS_NEXUS ); - - ret =mfd_add_devices (dev,-1 , config->cell_dev, - config->n_cell_devs,NULL ,0 , -regmap_irq_get_domain (pmic->irq_chip_data)); -if (ret) - goto err_del_irq_chip; - -return 0 ; - -err_del_irq_chip: -regmap_del_irq_chip (pmic->irq, pmic->irq_chip_data); -return ret; -} - -static int intel_soc_pmic_i2c_remove (struct i2c_client *i2c) -{ -struct intel_soc_pmic *pmic =dev_get_drvdata (&i2c->dev); - -regmap_del_irq_chip (pmic->irq, pmic->irq_chip_data); - -/* remove crc-pwm lookup table */ -pwm_remove_table (crc_pwm_lookup,ARRAY_SIZE (crc_pwm_lookup)); - -mfd_remove_devices (&i2c->dev); - -return 0 ; -} - -static void intel_soc_pmic_shutdown (struct i2c_client *i2c) -{ -struct intel_soc_pmic *pmic =dev_get_drvdata (&i2c->dev); - -disable_irq (pmic->irq); - -return ; -} - -#if defined(CONFIG_PM_SLEEP ) -static int intel_soc_pmic_suspend (struct device *dev) -{ -struct intel_soc_pmic *pmic =dev_get_drvdata (dev); - -disable_irq (pmic->irq); - -return 0 ; -} - -static int intel_soc_pmic_resume (struct device *dev) -{ -struct intel_soc_pmic *pmic =dev_get_drvdata (dev); - -enable_irq (pmic->irq); - -return 0 ; -} -#endif - -static SIMPLE_DEV_PM_OPS(intel_soc_pmic_pm_ops, intel_soc_pmic_suspend, - intel_soc_pmic_resume); - -static const struct i2c_device_id intel_soc_pmic_i2c_id[] = { - { } -}; -MODULE_DEVICE_TABLE (i2c, intel_soc_pmic_i2c_id); - -#if defined(CONFIG_ACPI ) -static const struct acpi_device_id intel_soc_pmic_acpi_match[] = { - {"INT33FD" }, - { }, -}; -MODULE_DEVICE_TABLE (acpi, intel_soc_pmic_acpi_match); -#endif - -static struct i2c_driver intel_soc_pmic_i2c_driver = { - .driver = { - .name ="intel_soc_pmic_i2c" , - .pm = &intel_soc_pmic_pm_ops, - .acpi_match_table =ACPI_PTR (intel_soc_pmic_acpi_match), - }, - .probe = intel_soc_pmic_i2c_probe, - .remove = intel_soc_pmic_i2c_remove, - .id_table = intel_soc_pmic_i2c_id, - .shutdown = intel_soc_pmic_shutdown, -}; - -module_i2c_driver (intel_soc_pmic_i2c_driver); - -MODULE_DESCRIPTION ("I2C driver for Intel SoC PMIC" ); -MODULE_LICENSE ("GPL v2" ); -MODULE_AUTHOR ("Yang, Bin <[email protected]>" ); -MODULE_AUTHOR ("Zhu, Lejun <[email protected]>" );drivers/mfd/intel_soc_pmic_core.h deleted +0
-25@@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* Intel SoC PMIC MFD Driver -* -* Copyright (C) 2012-2014 Intel Corporation. All rights reserved. -* -* Author: Yang, Bin <[email protected]> -* Author: Zhu, Lejun <[email protected]> -*/ - -#ifndef __INTEL_SOC_PMIC_CORE_H__ -#define __INTEL_SOC_PMIC_CORE_H__ - -struct intel_soc_pmic_config { -unsigned long irq_flags; -struct mfd_cell *cell_dev; -int n_cell_devs; -const struct regmap_config *regmap_config; -const struct regmap_irq_chip *irq_chip; -}; - -extern struct intel_soc_pmic_config intel_soc_pmic_config_byt_crc; -extern struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc; - -#endif /* __INTEL_SOC_PMIC_CORE_H__ */ drivers/mfd/intel_soc_pmic_crc.c +156
-6@@ -2,18 +2,21 @@/* * Device access for Crystal Cove PMIC * -* Copyright (C) 2013, 2014 Intel Corporation. All rights reserved. +* Copyright (C) 2012-2014 Intel Corporation. All rights reserved. * * Author: Yang, Bin <[email protected]> * Author: Zhu, Lejun <[email protected]> */ +#include <linux/acpi.h> +#include <linux/i2c.h> #include <linux/interrupt.h> -#include <linux/regmap.h> +#include <linux/module.h> #include <linux/mfd/core.h> #include <linux/mfd/intel_soc_pmic.h> - -#include "intel_soc_pmic_core.h" +#include <linux/platform_data/x86/soc.h> +#include <linux/pwm.h> +#include <linux/regmap.h> #define CRYSTAL_COVE_MAX_REGISTER 0xC6@@ -132,7 +135,20 @@ static const struct regmap_irq_chip crystal_cove_irq_chip = { .mask_base = CRYSTAL_COVE_REG_MIRQLVL1, }; -struct intel_soc_pmic_config intel_soc_pmic_config_byt_crc = { +/* PWM consumed by the Intel GFX */ +static struct pwm_lookup crc_pwm_lookup[] = { +PWM_LOOKUP ("crystal_cove_pwm" ,0 ,"0000:00:02.0" ,"pwm_pmic_backlight" ,0 ,PWM_POLARITY_NORMAL ), +}; + +struct intel_soc_pmic_config { +unsigned long irq_flags; +struct mfd_cell *cell_dev; +int n_cell_devs; +const struct regmap_config *regmap_config; +const struct regmap_irq_chip *irq_chip; +}; + +static const struct intel_soc_pmic_config intel_soc_pmic_config_byt_crc = { .irq_flags =IRQF_TRIGGER_RISING , .cell_dev = crystal_cove_byt_dev, .n_cell_devs =ARRAY_SIZE (crystal_cove_byt_dev),@@ -140,10 +156,144 @@ struct intel_soc_pmic_config intel_soc_pmic_config_byt_crc = { .irq_chip = &crystal_cove_irq_chip, }; -struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc = { +static const struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc = { .irq_flags =IRQF_TRIGGER_RISING , .cell_dev = crystal_cove_cht_dev, .n_cell_devs =ARRAY_SIZE (crystal_cove_cht_dev), .regmap_config = &crystal_cove_regmap_config, .irq_chip = &crystal_cove_irq_chip, }; + +static int intel_soc_pmic_i2c_probe (struct i2c_client *i2c, +const struct i2c_device_id *i2c_id) +{ +const struct intel_soc_pmic_config *config; +struct device *dev = &i2c->dev; +struct intel_soc_pmic *pmic; +int ret; + +if (soc_intel_is_byt ()) + config = &intel_soc_pmic_config_byt_crc; +else + config = &intel_soc_pmic_config_cht_crc; + + pmic =devm_kzalloc (dev,sizeof (*pmic),GFP_KERNEL ); +if (!pmic) +return -ENOMEM ; + +dev_set_drvdata (dev, pmic); + + pmic->regmap =devm_regmap_init_i2c (i2c, config->regmap_config); +if (IS_ERR (pmic->regmap)) +return PTR_ERR (pmic->regmap); + + pmic->irq = i2c->irq; + + ret =regmap_add_irq_chip (pmic->regmap, pmic->irq, + config->irq_flags |IRQF_ONESHOT , +0 , config->irq_chip, + &pmic->irq_chip_data); +if (ret) +return ret; + + ret =enable_irq_wake (pmic->irq); +if (ret) +dev_warn (dev,"Can't enable IRQ as wake source: %d\n" , ret); + +/* Add lookup table for crc-pwm */ +pwm_add_table (crc_pwm_lookup,ARRAY_SIZE (crc_pwm_lookup)); + +/* To distuingish this domain from the GPIO/charger's irqchip domains */ +irq_domain_update_bus_token (regmap_irq_get_domain (pmic->irq_chip_data), +DOMAIN_BUS_NEXUS ); + + ret =mfd_add_devices (dev,-1 , config->cell_dev, + config->n_cell_devs,NULL ,0 , +regmap_irq_get_domain (pmic->irq_chip_data)); +if (ret) + goto err_del_irq_chip; + +return 0 ; + +err_del_irq_chip: +regmap_del_irq_chip (pmic->irq, pmic->irq_chip_data); +return ret; +} + +static int intel_soc_pmic_i2c_remove (struct i2c_client *i2c) +{ +struct intel_soc_pmic *pmic =dev_get_drvdata (&i2c->dev); + +regmap_del_irq_chip (pmic->irq, pmic->irq_chip_data); + +/* remove crc-pwm lookup table */ +pwm_remove_table (crc_pwm_lookup,ARRAY_SIZE (crc_pwm_lookup)); + +mfd_remove_devices (&i2c->dev); + +return 0 ; +} + +static void intel_soc_pmic_shutdown (struct i2c_client *i2c) +{ +struct intel_soc_pmic *pmic =dev_get_drvdata (&i2c->dev); + +disable_irq (pmic->irq); + +return ; +} + +#if defined(CONFIG_PM_SLEEP ) +static int intel_soc_pmic_suspend (struct device *dev) +{ +struct intel_soc_pmic *pmic =dev_get_drvdata (dev); + +disable_irq (pmic->irq); + +return 0 ; +} + +static int intel_soc_pmic_resume (struct device *dev) +{ +struct intel_soc_pmic *pmic =dev_get_drvdata (dev); + +enable_irq (pmic->irq); + +return 0 ; +} +#endif + +static SIMPLE_DEV_PM_OPS(intel_soc_pmic_pm_ops, intel_soc_pmic_suspend, + intel_soc_pmic_resume); + +static const struct i2c_device_id intel_soc_pmic_i2c_id[] = { + { } +}; +MODULE_DEVICE_TABLE (i2c, intel_soc_pmic_i2c_id); + +#if defined(CONFIG_ACPI ) +static const struct acpi_device_id intel_soc_pmic_acpi_match[] = { + {"INT33FD" }, + { }, +}; +MODULE_DEVICE_TABLE (acpi, intel_soc_pmic_acpi_match); +#endif + +static struct i2c_driver intel_soc_pmic_i2c_driver = { + .driver = { + .name ="intel_soc_pmic_i2c" , + .pm = &intel_soc_pmic_pm_ops, + .acpi_match_table =ACPI_PTR (intel_soc_pmic_acpi_match), + }, + .probe = intel_soc_pmic_i2c_probe, + .remove = intel_soc_pmic_i2c_remove, + .id_table = intel_soc_pmic_i2c_id, + .shutdown = intel_soc_pmic_shutdown, +}; + +module_i2c_driver (intel_soc_pmic_i2c_driver); + +MODULE_DESCRIPTION ("I2C driver for Intel SoC PMIC" ); +MODULE_LICENSE ("GPL v2" ); +MODULE_AUTHOR ("Yang, Bin <[email protected]>" ); +MODULE_AUTHOR ("Zhu, Lejun <[email protected]>" );
Quoted 9 lines · Hans de Goede
Hi,
Thank you for this series, cleaning this up is long overdue.
The entire series looks good to me:
Reviewed-by Hans de Goede <[email protected]>for the series.
Thanks!
Quoted 3 lines
Maybe do a follow up renaming
CONFIG_INTEL_SOC_PMICtoCONFIG_INTEL_SOC_PMIC_CRCand also change the module name from intel-soc-pmic to intel-soc-pmic-crc ?
I thought about that, but decided to leave it for later since it will take a lot of subsystems and better to be considered out of the scope of this series.
Do you agree?
Quoted 2 lines
I don't expect any userspace dependencies on the module-name (there are no module parameters) so this should be fine.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi,
Quoted 13 lines · Andy Shevchenko
Quoted 9 lines · Hans de Goede
Hi,
Thank you for this series, cleaning this up is long overdue.
The entire series looks good to me:
Reviewed-by Hans de Goede <[email protected]>for the series.
Thanks!
Quoted 8 lines
Quoted 3 lines
Maybe do a follow up renaming
CONFIG_INTEL_SOC_PMICtoCONFIG_INTEL_SOC_PMIC_CRCand also change the module name from intel-soc-pmic to intel-soc-pmic-crc ?I thought about that, but decided to leave it for later since it will take a lot of subsystems and better to be considered out of the scope of this series.
Do you agree?
Sure we can do this later. Note that there are not that much dependencies on INTEL_SOC_PMIC though. The ones which I could find are:
drivers/usb/typec/tcpm/Kconfig: config TYPEC_WCOVE -which is wrong regardless of the rename and should just be dropped
in a separate/unrelated patch. can you submit a patch for this ?
drivers/gpio/Kconfig: config GPIO_CRYSTAL_COVE drivers/pwm/Kconfig: config PWM_CRC drivers/acpi/pmic/Kconfig: config BYTCRC_PMIC_OPREGION &&
config CHTCRC_PMIC_OPREGION
So not that much, but still 3 subystems, so yeah probably best to do that cleanup later,
Regards,
Hans
Quoted 4 lines
Quoted 3 lines
I don't expect any userspace dependencies on the module-name (there are no module parameters) so this should be fine.
Quoted 2 lines · Hans de Goede
Quoted 1 line · Andy Shevchenko
On Mon, Jun 20, 2022 at 10:51:33AM +0200, Hans de Goede wrote:
...
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Maybe do a follow up renaming
CONFIG_INTEL_SOC_PMICtoCONFIG_INTEL_SOC_PMIC_CRCand also change the module name from intel-soc-pmic to intel-soc-pmic-crc ?I thought about that, but decided to leave it for later since it will take a lot of subsystems and better to be considered out of the scope of this series.
Quoted 8 lines
Quoted 1 line
Do you agree?
Sure we can do this later. Note that there are not that much dependencies on
INTEL_SOC_PMICthough. The ones which I could find are:
drivers/usb/typec/tcpm/Kconfig: configTYPEC_WCOVE-which is wrong regardless of the rename and should just be dropped
in a separate/unrelated patch. can you submit a patch for this ?
Sure...
Done!
Quoted 7 lines
drivers/gpio/Kconfig: configGPIO_CRYSTAL_COVEdrivers/pwm/Kconfig: configPWM_CRCdrivers/acpi/pmic/Kconfig: configBYTCRC_PMIC_OPREGION&&
configCHTCRC_PMIC_OPREGIONSo not that much, but still 3 subystems, so yeah probably best to do that cleanup later,
Yup, let's do it later with Type-C fix in mind, that will save us doing unneeded churn.
Signature · 2 lines
With Best Regards, Andy Shevchenko
p.s.
I've added this commit to my local tree, so that the next time I boot a device with a CRC PMIC it will get some testing.
Quoted 427 lines · Andy Shevchenko
The core part is misleading since its only purpose to serve Crystal Cove PMIC, although for couple of different platforms. Merge core part into crc one.
Advantages among others are:
- speed up a compilation and build
- decreasing the code base
- reducing noise in the namespace by making some data static and constSigned-off-by Andy Shevchenko <[email protected]>--- drivers/mfd/Makefile | 3 +- drivers/mfd/intel_soc_pmic_core.c | 160 ----------------------------- drivers/mfd/intel_soc_pmic_core.h | 25 ----- drivers/mfd/intel_soc_pmic_crc.c | 162 ++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 193 deletions(-) delete mode 100644 drivers/mfd/intel_soc_pmic_core.c delete mode 100644 drivers/mfd/intel_soc_pmic_core.hdrivers/mfd/Makefile +1
-2@@ -236,8 +236,7 @@ obj-$(CONFIG_MFD_RT4831) += rt4831.o obj-$(CONFIG_MFD_RT5033) += rt5033.o obj-$(CONFIG_MFD_SKY81452) += sky81452.o -intel-soc-pmic-objs := intel_soc_pmic_core.o intel_soc_pmic_crc.o -obj-$(CONFIG_INTEL_SOC_PMIC) += intel-soc-pmic.o +obj-$(CONFIG_INTEL_SOC_PMIC) += intel_soc_pmic_crc.o obj-$(CONFIG_INTEL_SOC_PMIC_BXTWC) += intel_soc_pmic_bxtwc.o obj-$(CONFIG_INTEL_SOC_PMIC_CHTWC) += intel_soc_pmic_chtwc.o obj-$(CONFIG_INTEL_SOC_PMIC_CHTDC_TI) += intel_soc_pmic_chtdc_ti.odrivers/mfd/intel_soc_pmic_core.c deleted +0
-160@@ -1,160 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* -* Intel SoC PMIC MFD Driver -* -* Copyright (C) 2013, 2014 Intel Corporation. All rights reserved. -* -* Author: Yang, Bin <[email protected]> -* Author: Zhu, Lejun <[email protected]> -*/ - -#include <linux/acpi.h> -#include <linux/i2c.h> -#include <linux/interrupt.h> -#include <linux/module.h> -#include <linux/mfd/core.h> -#include <linux/mfd/intel_soc_pmic.h> -#include <linux/platform_data/x86/soc.h> -#include <linux/pwm.h> -#include <linux/regmap.h> - -#include "intel_soc_pmic_core.h" - -/* PWM consumed by the Intel GFX */ -static struct pwm_lookup crc_pwm_lookup[] = { -PWM_LOOKUP ("crystal_cove_pwm" ,0 ,"0000:00:02.0" ,"pwm_pmic_backlight" ,0 ,PWM_POLARITY_NORMAL ), -}; - -static int intel_soc_pmic_i2c_probe (struct i2c_client *i2c, -const struct i2c_device_id *i2c_id) -{ -struct device *dev = &i2c->dev; -struct intel_soc_pmic_config *config; -struct intel_soc_pmic *pmic; -int ret; - -if (soc_intel_is_byt ()) - config = &intel_soc_pmic_config_byt_crc; -else - config = &intel_soc_pmic_config_cht_crc; - - pmic =devm_kzalloc (dev,sizeof (*pmic),GFP_KERNEL ); -if (!pmic) -return -ENOMEM ; - -dev_set_drvdata (dev, pmic); - - pmic->regmap =devm_regmap_init_i2c (i2c, config->regmap_config); -if (IS_ERR (pmic->regmap)) -return PTR_ERR (pmic->regmap); - - pmic->irq = i2c->irq; - - ret =regmap_add_irq_chip (pmic->regmap, pmic->irq, - config->irq_flags |IRQF_ONESHOT , -0 , config->irq_chip, - &pmic->irq_chip_data); -if (ret) -return ret; - - ret =enable_irq_wake (pmic->irq); -if (ret) -dev_warn (dev,"Can't enable IRQ as wake source: %d\n" , ret); - -/* Add lookup table for crc-pwm */ -pwm_add_table (crc_pwm_lookup,ARRAY_SIZE (crc_pwm_lookup)); - -/* To distuingish this domain from the GPIO/charger's irqchip domains */ -irq_domain_update_bus_token (regmap_irq_get_domain (pmic->irq_chip_data), -DOMAIN_BUS_NEXUS ); - - ret =mfd_add_devices (dev,-1 , config->cell_dev, - config->n_cell_devs,NULL ,0 , -regmap_irq_get_domain (pmic->irq_chip_data)); -if (ret) - goto err_del_irq_chip; - -return 0 ; - -err_del_irq_chip: -regmap_del_irq_chip (pmic->irq, pmic->irq_chip_data); -return ret; -} - -static int intel_soc_pmic_i2c_remove (struct i2c_client *i2c) -{ -struct intel_soc_pmic *pmic =dev_get_drvdata (&i2c->dev); - -regmap_del_irq_chip (pmic->irq, pmic->irq_chip_data); - -/* remove crc-pwm lookup table */ -pwm_remove_table (crc_pwm_lookup,ARRAY_SIZE (crc_pwm_lookup)); - -mfd_remove_devices (&i2c->dev); - -return 0 ; -} - -static void intel_soc_pmic_shutdown (struct i2c_client *i2c) -{ -struct intel_soc_pmic *pmic =dev_get_drvdata (&i2c->dev); - -disable_irq (pmic->irq); - -return ; -} - -#if defined(CONFIG_PM_SLEEP ) -static int intel_soc_pmic_suspend (struct device *dev) -{ -struct intel_soc_pmic *pmic =dev_get_drvdata (dev); - -disable_irq (pmic->irq); - -return 0 ; -} - -static int intel_soc_pmic_resume (struct device *dev) -{ -struct intel_soc_pmic *pmic =dev_get_drvdata (dev); - -enable_irq (pmic->irq); - -return 0 ; -} -#endif - -static SIMPLE_DEV_PM_OPS(intel_soc_pmic_pm_ops, intel_soc_pmic_suspend, - intel_soc_pmic_resume); - -static const struct i2c_device_id intel_soc_pmic_i2c_id[] = { - { } -}; -MODULE_DEVICE_TABLE (i2c, intel_soc_pmic_i2c_id); - -#if defined(CONFIG_ACPI ) -static const struct acpi_device_id intel_soc_pmic_acpi_match[] = { - {"INT33FD" }, - { }, -}; -MODULE_DEVICE_TABLE (acpi, intel_soc_pmic_acpi_match); -#endif - -static struct i2c_driver intel_soc_pmic_i2c_driver = { - .driver = { - .name ="intel_soc_pmic_i2c" , - .pm = &intel_soc_pmic_pm_ops, - .acpi_match_table =ACPI_PTR (intel_soc_pmic_acpi_match), - }, - .probe = intel_soc_pmic_i2c_probe, - .remove = intel_soc_pmic_i2c_remove, - .id_table = intel_soc_pmic_i2c_id, - .shutdown = intel_soc_pmic_shutdown, -}; - -module_i2c_driver (intel_soc_pmic_i2c_driver); - -MODULE_DESCRIPTION ("I2C driver for Intel SoC PMIC" ); -MODULE_LICENSE ("GPL v2" ); -MODULE_AUTHOR ("Yang, Bin <[email protected]>" ); -MODULE_AUTHOR ("Zhu, Lejun <[email protected]>" );drivers/mfd/intel_soc_pmic_core.h deleted +0
-25@@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* Intel SoC PMIC MFD Driver -* -* Copyright (C) 2012-2014 Intel Corporation. All rights reserved. -* -* Author: Yang, Bin <[email protected]> -* Author: Zhu, Lejun <[email protected]> -*/ - -#ifndef __INTEL_SOC_PMIC_CORE_H__ -#define __INTEL_SOC_PMIC_CORE_H__ - -struct intel_soc_pmic_config { -unsigned long irq_flags; -struct mfd_cell *cell_dev; -int n_cell_devs; -const struct regmap_config *regmap_config; -const struct regmap_irq_chip *irq_chip; -}; - -extern struct intel_soc_pmic_config intel_soc_pmic_config_byt_crc; -extern struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc; - -#endif /* __INTEL_SOC_PMIC_CORE_H__ */ drivers/mfd/intel_soc_pmic_crc.c +156
-6@@ -2,18 +2,21 @@/* * Device access for Crystal Cove PMIC * -* Copyright (C) 2013, 2014 Intel Corporation. All rights reserved. +* Copyright (C) 2012-2014 Intel Corporation. All rights reserved. * * Author: Yang, Bin <[email protected]> * Author: Zhu, Lejun <[email protected]> */ +#include <linux/acpi.h> +#include <linux/i2c.h> #include <linux/interrupt.h> -#include <linux/regmap.h> +#include <linux/module.h> #include <linux/mfd/core.h> #include <linux/mfd/intel_soc_pmic.h> - -#include "intel_soc_pmic_core.h" +#include <linux/platform_data/x86/soc.h> +#include <linux/pwm.h> +#include <linux/regmap.h> #define CRYSTAL_COVE_MAX_REGISTER 0xC6@@ -132,7 +135,20 @@ static const struct regmap_irq_chip crystal_cove_irq_chip = { .mask_base = CRYSTAL_COVE_REG_MIRQLVL1, }; -struct intel_soc_pmic_config intel_soc_pmic_config_byt_crc = { +/* PWM consumed by the Intel GFX */ +static struct pwm_lookup crc_pwm_lookup[] = { +PWM_LOOKUP ("crystal_cove_pwm" ,0 ,"0000:00:02.0" ,"pwm_pmic_backlight" ,0 ,PWM_POLARITY_NORMAL ), +}; + +struct intel_soc_pmic_config { +unsigned long irq_flags; +struct mfd_cell *cell_dev; +int n_cell_devs; +const struct regmap_config *regmap_config; +const struct regmap_irq_chip *irq_chip; +}; + +static const struct intel_soc_pmic_config intel_soc_pmic_config_byt_crc = { .irq_flags =IRQF_TRIGGER_RISING , .cell_dev = crystal_cove_byt_dev, .n_cell_devs =ARRAY_SIZE (crystal_cove_byt_dev),@@ -140,10 +156,144 @@ struct intel_soc_pmic_config intel_soc_pmic_config_byt_crc = { .irq_chip = &crystal_cove_irq_chip, }; -struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc = { +static const struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc = { .irq_flags =IRQF_TRIGGER_RISING , .cell_dev = crystal_cove_cht_dev, .n_cell_devs =ARRAY_SIZE (crystal_cove_cht_dev), .regmap_config = &crystal_cove_regmap_config, .irq_chip = &crystal_cove_irq_chip, }; + +static int intel_soc_pmic_i2c_probe (struct i2c_client *i2c, +const struct i2c_device_id *i2c_id) +{ +const struct intel_soc_pmic_config *config; +struct device *dev = &i2c->dev; +struct intel_soc_pmic *pmic; +int ret; + +if (soc_intel_is_byt ()) + config = &intel_soc_pmic_config_byt_crc; +else + config = &intel_soc_pmic_config_cht_crc; + + pmic =devm_kzalloc (dev,sizeof (*pmic),GFP_KERNEL ); +if (!pmic) +return -ENOMEM ; + +dev_set_drvdata (dev, pmic); + + pmic->regmap =devm_regmap_init_i2c (i2c, config->regmap_config); +if (IS_ERR (pmic->regmap)) +return PTR_ERR (pmic->regmap); + + pmic->irq = i2c->irq; + + ret =regmap_add_irq_chip (pmic->regmap, pmic->irq, + config->irq_flags |IRQF_ONESHOT , +0 , config->irq_chip, + &pmic->irq_chip_data); +if (ret) +return ret; + + ret =enable_irq_wake (pmic->irq); +if (ret) +dev_warn (dev,"Can't enable IRQ as wake source: %d\n" , ret); + +/* Add lookup table for crc-pwm */ +pwm_add_table (crc_pwm_lookup,ARRAY_SIZE (crc_pwm_lookup)); + +/* To distuingish this domain from the GPIO/charger's irqchip domains */ +irq_domain_update_bus_token (regmap_irq_get_domain (pmic->irq_chip_data), +DOMAIN_BUS_NEXUS ); + + ret =mfd_add_devices (dev,-1 , config->cell_dev, + config->n_cell_devs,NULL ,0 , +regmap_irq_get_domain (pmic->irq_chip_data)); +if (ret) + goto err_del_irq_chip; + +return 0 ; + +err_del_irq_chip: +regmap_del_irq_chip (pmic->irq, pmic->irq_chip_data); +return ret; +} + +static int intel_soc_pmic_i2c_remove (struct i2c_client *i2c) +{ +struct intel_soc_pmic *pmic =dev_get_drvdata (&i2c->dev); + +regmap_del_irq_chip (pmic->irq, pmic->irq_chip_data); + +/* remove crc-pwm lookup table */ +pwm_remove_table (crc_pwm_lookup,ARRAY_SIZE (crc_pwm_lookup)); + +mfd_remove_devices (&i2c->dev); + +return 0 ; +} + +static void intel_soc_pmic_shutdown (struct i2c_client *i2c) +{ +struct intel_soc_pmic *pmic =dev_get_drvdata (&i2c->dev); + +disable_irq (pmic->irq); + +return ; +} + +#if defined(CONFIG_PM_SLEEP ) +static int intel_soc_pmic_suspend (struct device *dev) +{ +struct intel_soc_pmic *pmic =dev_get_drvdata (dev); + +disable_irq (pmic->irq); + +return 0 ; +} + +static int intel_soc_pmic_resume (struct device *dev) +{ +struct intel_soc_pmic *pmic =dev_get_drvdata (dev); + +enable_irq (pmic->irq); + +return 0 ; +} +#endif + +static SIMPLE_DEV_PM_OPS(intel_soc_pmic_pm_ops, intel_soc_pmic_suspend, + intel_soc_pmic_resume); + +static const struct i2c_device_id intel_soc_pmic_i2c_id[] = { + { } +}; +MODULE_DEVICE_TABLE (i2c, intel_soc_pmic_i2c_id); + +#if defined(CONFIG_ACPI ) +static const struct acpi_device_id intel_soc_pmic_acpi_match[] = { + {"INT33FD" }, + { }, +}; +MODULE_DEVICE_TABLE (acpi, intel_soc_pmic_acpi_match); +#endif + +static struct i2c_driver intel_soc_pmic_i2c_driver = { + .driver = { + .name ="intel_soc_pmic_i2c" , + .pm = &intel_soc_pmic_pm_ops, + .acpi_match_table =ACPI_PTR (intel_soc_pmic_acpi_match), + }, + .probe = intel_soc_pmic_i2c_probe, + .remove = intel_soc_pmic_i2c_remove, + .id_table = intel_soc_pmic_i2c_id, + .shutdown = intel_soc_pmic_shutdown, +}; + +module_i2c_driver (intel_soc_pmic_i2c_driver); + +MODULE_DESCRIPTION ("I2C driver for Intel SoC PMIC" ); +MODULE_LICENSE ("GPL v2" ); +MODULE_AUTHOR ("Yang, Bin <[email protected]>" ); +MODULE_AUTHOR ("Zhu, Lejun <[email protected]>" );
Quoted 4 lines · Hans de Goede
p.s.
I've added this commit to my local tree, so that the next time I boot a device with a CRC PMIC it will get some testing.
Thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 4 lines · Hans de Goede
p.s.
I've added this commit to my local tree, so that the next time I boot a device with a CRC PMIC it will get some testing.
Have you had a chance to boot such device?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hans de Goede
Tested-byHi,
Quoted 7 lines · Andy Shevchenko
Quoted 4 lines · Hans de Goede
p.s.
I've added this commit to my local tree, so that the next time I boot a device with a CRC PMIC it will get some testing.
Have you had a chance to boot such device?
Not yet, but I've just put a new kernel on one of these devices and everything still works fine AFAICT:
Regards,
Hans
Quoted 9 lines · Hans de Goede
Hi,
Quoted 6 lines · Andy Shevchenko
Quoted 4 lines · Hans de Goede
p.s.
I've added this commit to my local tree, so that the next time I boot a device with a CRC PMIC it will get some testing.
Quoted 6 lines
Quoted 1 line
Have you had a chance to boot such device?
Not yet, but I've just put a new kernel on one of these devices and everything still works fine AFAICT:
Tested-by Hans de Goede <[email protected]>
p.s.
This is for the entire series.
Regards,
Hans
Quoted 10 lines · Hans de Goede
Quoted 9 lines · Hans de Goede
Quoted 7 lines · Andy Shevchenko
Quoted 4 lines · Hans de Goede
p.s.
I've added this commit to my local tree, so that the next time I boot a device with a CRC PMIC it will get some testing.
Have you had a chance to boot such device?
Quoted 8 lines
Quoted 4 lines
Not yet, but I've just put a new kernel on one of these devices and everything still works fine AFAICT:
Tested-by Hans de Goede <[email protected]>p.s.
This is for the entire series.
Thanks, I applied it locally in case I would need to send another version with some additional flags for git format-patch. Otherwise I hope Lee can catch up it from here.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 9 lines · Andy Shevchenko
The core part is misleading since its only purpose to serve Crystal Cove PMIC, although for couple of different platforms. Merge core part into crc one.
Advantages among others are:
- speed up a compilation and build
- decreasing the code base
- reducing noise in the namespace by making some data static and constSigned-off-by Andy Shevchenko <[email protected]>
Quoted 8 lines
--- drivers/mfd/Makefile | 3 +- drivers/mfd/intel_soc_pmic_core.c | 160 ----------------------------- drivers/mfd/intel_soc_pmic_core.h | 25 ----- drivers/mfd/intel_soc_pmic_crc.c | 162 ++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 193 deletions(-) delete mode 100644 drivers/mfd/intel_soc_pmic_core.c delete mode 100644 drivers/mfd/intel_soc_pmic_core.h
Can you submit this again with the -M flag please.
Trying to figure out what exactly changed is proving challenging.
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 1 line · Lee Jones
On Thu, 16 Jun 2022, Andy Shevchenko wrote:
...
Quoted 8 lines
Quoted 6 lines
drivers/mfd/intel_soc_pmic_core.c | 160 ----------------------------- drivers/mfd/intel_soc_pmic_core.h | 25 ----- drivers/mfd/intel_soc_pmic_crc.c | 162 ++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 193 deletions(-) delete mode 100644 drivers/mfd/intel_soc_pmic_core.c delete mode 100644 drivers/mfd/intel_soc_pmic_core.hCan you submit this again with the -M flag please.
This is done with this flag. Basically for the last several years I do my submissions with that flag.
Anything else I can do?
Quoted 1 line
Trying to figure out what exactly changed is proving challenging.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 12 lines · Andy Shevchenko
Quoted 1 line · Lee Jones
On Thu, 16 Jun 2022, Andy Shevchenko wrote:
...
Quoted 7 lines
Quoted 6 lines
drivers/mfd/intel_soc_pmic_core.c | 160 ----------------------------- drivers/mfd/intel_soc_pmic_core.h | 25 ----- drivers/mfd/intel_soc_pmic_crc.c | 162 ++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 193 deletions(-) delete mode 100644 drivers/mfd/intel_soc_pmic_core.c delete mode 100644 drivers/mfd/intel_soc_pmic_core.h
Quoted 4 lines
Quoted 1 line
Can you submit this again with the -M flag please.
This is done with this flag. Basically for the last several years I do my submissions with that flag.
Odd. I thought -M only showed diff for the changes.
Quoted 4 lines
Anything else I can do?
Quoted 1 line
Trying to figure out what exactly changed is proving challenging.
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 2 lines · Lee Jones
Quoted 1 line · Lee Jones
Quoted 1 line · Andy Shevchenko
...
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
drivers/mfd/intel_soc_pmic_core.c | 160 ----------------------------- drivers/mfd/intel_soc_pmic_core.h | 25 ----- drivers/mfd/intel_soc_pmic_crc.c | 162 ++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 193 deletions(-) delete mode 100644 drivers/mfd/intel_soc_pmic_core.c delete mode 100644 drivers/mfd/intel_soc_pmic_core.h
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Can you submit this again with the -M flag please.
This is done with this flag. Basically for the last several years I do my submissions with that flag.
Odd. I thought -M only showed diff for the changes.
It's exactly what happens here in this patch. What did I miss?
Note here is not renaming, but merging contents of one file (actually two files) into another. What you are talking about is probably -D, but AFAIR Git (at least that time) can't catch up deleted files from the mbox format. That's why I do not use -D for submissions.
Quoted 3 lines
Quoted 3 lines
Anything else I can do?
Quoted 1 line
Trying to figure out what exactly changed is proving challenging.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 18 lines · Andy Shevchenko
Quoted 2 lines · Lee Jones
Quoted 1 line · Lee Jones
Quoted 1 line · Andy Shevchenko
...
Quoted 12 lines
Quoted 11 lines
Quoted 8 lines
Quoted 6 lines
drivers/mfd/intel_soc_pmic_core.c | 160 ----------------------------- drivers/mfd/intel_soc_pmic_core.h | 25 ----- drivers/mfd/intel_soc_pmic_crc.c | 162 ++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 193 deletions(-) delete mode 100644 drivers/mfd/intel_soc_pmic_core.c delete mode 100644 drivers/mfd/intel_soc_pmic_core.hCan you submit this again with the -M flag please.
This is done with this flag. Basically for the last several years I do my submissions with that flag.
Quoted 8 lines
Quoted 1 line
Odd. I thought -M only showed diff for the changes.
It's exactly what happens here in this patch. What did I miss?
Note here is not renaming, but merging contents of one file (actually two files) into another. What you are talking about is probably -D, but AFAIR Git (at least that time) can't catch up deleted files from the mbox format. That's why I do not use -D for submissions.
Ah yes, that's probably it then.
From a quick look at the diff (I missed the 2 "--" at the end), it looked like this was a rename. In which case -M won't do anything useful here. I'll have to brain grep the differences instead.
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 4 lines · Lee Jones
Quoted 3 lines · Andy Shevchenko
Quoted 2 lines · Lee Jones
Quoted 1 line · Lee Jones
Quoted 1 line · Andy Shevchenko
...
Quoted 21 lines
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Quoted 8 lines
Quoted 6 lines
drivers/mfd/intel_soc_pmic_core.c | 160 ----------------------------- drivers/mfd/intel_soc_pmic_core.h | 25 ----- drivers/mfd/intel_soc_pmic_crc.c | 162 ++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 193 deletions(-) delete mode 100644 drivers/mfd/intel_soc_pmic_core.c delete mode 100644 drivers/mfd/intel_soc_pmic_core.hCan you submit this again with the -M flag please.
This is done with this flag. Basically for the last several years I do my submissions with that flag.
Quoted 8 lines
Quoted 1 line
Odd. I thought -M only showed diff for the changes.
It's exactly what happens here in this patch. What did I miss?
Note here is not renaming, but merging contents of one file (actually two files) into another. What you are talking about is probably -D, but AFAIR Git (at least that time) can't catch up deleted files from the mbox format. That's why I do not use -D for submissions.
Quoted 5 lines
Ah yes, that's probably it then.
From a quick look at the diff (I missed the 2 "--" at the end), it looked like this was a rename. In which case -M won't do anything useful here. I'll have to brain grep the differences instead.
Please do, it will be good to have this double checked.
As I pointed out in the commit message the main difference in the code (after massaging the header inclusion block) is the static const. Without static we will have warning from the compiler, const is the new thingy, besides the merge of the Copyright line.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi,
Quoted 29 lines · Andy Shevchenko
Quoted 4 lines · Lee Jones
Quoted 3 lines · Andy Shevchenko
Quoted 2 lines · Lee Jones
Quoted 1 line · Lee Jones
Quoted 1 line · Andy Shevchenko
...
Quoted 21 lines
Quoted 20 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
drivers/mfd/intel_soc_pmic_core.c | 160 ----------------------------- drivers/mfd/intel_soc_pmic_core.h | 25 ----- drivers/mfd/intel_soc_pmic_crc.c | 162 ++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 193 deletions(-) delete mode 100644 drivers/mfd/intel_soc_pmic_core.c delete mode 100644 drivers/mfd/intel_soc_pmic_core.hQuoted 6 lines
Quoted 4 lines
Quoted 1 line
Can you submit this again with the -M flag please.
This is done with this flag. Basically for the last several years I do my submissions with that flag.
Odd. I thought -M only showed diff for the changes.
It's exactly what happens here in this patch. What did I miss?
Note here is not renaming, but merging contents of one file (actually two files) into another. What you are talking about is probably -D, but AFAIR Git (at least that time) can't catch up deleted files from the mbox format. That's why I do not use -D for submissions.
Quoted 7 lines
Quoted 5 lines
Ah yes, that's probably it then.
From a quick look at the diff (I missed the 2 "--" at the end), it looked like this was a rename. In which case -M won't do anything useful here. I'll have to brain grep the differences instead.
Please do, it will be good to have this double checked.
Note that I already did a manual compare of the moved code blocks to check that they were not changed before giving my Reviewed-by.
Regards,
Hans
Quoted 34 lines · Hans de Goede
Hi,
Quoted 31 lines · Andy Shevchenko
Quoted 4 lines · Lee Jones
Quoted 3 lines · Andy Shevchenko
Quoted 2 lines · Lee Jones
Quoted 1 line · Lee Jones
Quoted 1 line · Andy Shevchenko
...
Quoted 23 lines
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Quoted 8 lines
Quoted 6 lines
drivers/mfd/intel_soc_pmic_core.c | 160 ----------------------------- drivers/mfd/intel_soc_pmic_core.h | 25 ----- drivers/mfd/intel_soc_pmic_crc.c | 162 ++++++++++++++++++++++++++++-- 4 files changed, 157 insertions(+), 193 deletions(-) delete mode 100644 drivers/mfd/intel_soc_pmic_core.c delete mode 100644 drivers/mfd/intel_soc_pmic_core.hCan you submit this again with the -M flag please.
This is done with this flag. Basically for the last several years I do my submissions with that flag.
Quoted 8 lines
Quoted 1 line
Odd. I thought -M only showed diff for the changes.
It's exactly what happens here in this patch. What did I miss?
Note here is not renaming, but merging contents of one file (actually two files) into another. What you are talking about is probably -D, but AFAIR Git (at least that time) can't catch up deleted files from the mbox format. That's why I do not use -D for submissions.
Ah yes, that's probably it then.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
From a quick look at the diff (I missed the 2 "--" at the end), it looked like this was a rename. In which case -M won't do anything useful here. I'll have to brain grep the differences instead.
Please do, it will be good to have this double checked.
Note that I already did a manual compare of the moved code blocks to check that they were not changed before giving my Reviewed-by.
Super, thanks Hans.
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 2 lines · Lee Jones
Quoted 1 line · Hans de Goede
On 6/30/22 10:07, Andy Shevchenko wrote:
...
Quoted 4 lines
Quoted 2 lines
Note that I already did a manual compare of the moved code blocks to check that they were not changed before giving my Reviewed-by.
Super, thanks Hans.
Is it okay to be applied?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 4 lines · Andy Shevchenko
Quoted 2 lines · Lee Jones
Quoted 1 line · Hans de Goede
On 6/30/22 10:07, Andy Shevchenko wrote:
Quoted 8 lines
...
Quoted 4 lines
Quoted 2 lines
Note that I already did a manual compare of the moved code blocks to check that they were not changed before giving my Reviewed-by.
Super, thanks Hans.
Is it okay to be applied?
Yes, I think so.
Can you collect all of the Acked-by/Tested-by tags you received and submit a [RESEND] please? Hans' TB which should be applied to all patches springs to mind.
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 13 lines · Lee Jones
Quoted 11 lines · Andy Shevchenko
Quoted 2 lines · Lee Jones
Quoted 1 line · Hans de Goede
On 6/30/22 10:07, Andy Shevchenko wrote:
...
Quoted 4 lines
Quoted 2 lines
Note that I already did a manual compare of the moved code blocks to check that they were not changed before giving my Reviewed-by.
Super, thanks Hans.
Quoted 7 lines
Quoted 1 line
Is it okay to be applied?
Yes, I think so.
Can you collect all of the Acked-by/Tested-by tags you received and submit a [RESEND] please? Hans' TB which should be applied to all patches springs to mind.
To save yourself some pain, leave off my Acks.
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Quoted 3 lines · Lee Jones
Quoted 2 lines · Lee Jones
Quoted 1 line · Andy Shevchenko
On Thu, Jun 30, 2022 at 09:45:53AM +0100, Lee Jones wrote:
...
Quoted 9 lines
Quoted 7 lines
Quoted 1 line
Is it okay to be applied?
Yes, I think so.
Can you collect all of the Acked-by/Tested-by tags you received and submit a [RESEND] please? Hans' TB which should be applied to all patches springs to mind.
To save yourself some pain, leave off my Acks.
Actually it's less pain to leave your tags as they are now in the commit messages.
I will resend it soon with your tags still in.
Thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 15 lines · Andy Shevchenko
Quoted 3 lines · Lee Jones
Quoted 2 lines · Lee Jones
Quoted 1 line · Andy Shevchenko
On Thu, Jun 30, 2022 at 09:45:53AM +0100, Lee Jones wrote:
...
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Is it okay to be applied?
Yes, I think so.
Can you collect all of the Acked-by/Tested-by tags you received and submit a [RESEND] please? Hans' TB which should be applied to all patches springs to mind.
Quoted 6 lines
Quoted 1 line
To save yourself some pain, leave off my Acks.
Actually it's less pain to leave your tags as they are now in the commit messages.
I will resend it soon with your tags still in.
Sure, whatever works.
Signature · 4 lines
Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog