All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store()
@ 2022-06-16 16:58 Andy Shevchenko
  2022-06-16 16:58 ` [PATCH v1 02/11] mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility Andy Shevchenko
                   ` (10 more replies)
  0 siblings, 11 replies; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-16 16:58 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Lee Jones

kstrtox() along with regmap API can return different error codes based on
circumstances.

Don't shadow them when returning to the caller.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index bc069c4daa60..3148a319d467 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -339,10 +339,14 @@ static ssize_t addr_show(struct device *dev,
 static ssize_t addr_store(struct device *dev,
 			  struct device_attribute *attr, const char *buf, size_t count)
 {
-	if (kstrtoul(buf, 0, &bxtwc_reg_addr)) {
+	int ret;
+
+	ret = kstrtoul(buf, 0, &bxtwc_reg_addr);
+	if (ret) {
 		dev_err(dev, "Invalid register address\n");
-		return -EINVAL;
+		return ret;
 	}
+
 	return (ssize_t)count;
 }
 
@@ -354,9 +358,9 @@ static ssize_t val_show(struct device *dev,
 	struct intel_soc_pmic *pmic = dev_get_drvdata(dev);
 
 	ret = regmap_read(pmic->regmap, bxtwc_reg_addr, &val);
-	if (ret < 0) {
+	if (ret) {
 		dev_err(dev, "Failed to read 0x%lx\n", bxtwc_reg_addr);
-		return -EIO;
+		return ret;
 	}
 
 	return sprintf(buf, "0x%02x\n", val);
@@ -377,7 +381,7 @@ static ssize_t val_store(struct device *dev,
 	if (ret) {
 		dev_err(dev, "Failed to write value 0x%02x to address 0x%lx",
 			val, bxtwc_reg_addr);
-		return -EIO;
+		return ret;
 	}
 	return count;
 }
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v1 02/11] mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility
  2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
@ 2022-06-16 16:58 ` Andy Shevchenko
  2022-06-27  9:07   ` Lee Jones
  2022-06-16 16:58 ` [PATCH v1 03/11] mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata() Andy Shevchenko
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-16 16:58 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Lee Jones

Driver core takes care of sysfs attributes. Use this facility instead of
doing it explicitly in ->probe() and ->remove().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 3148a319d467..fbf421d56a73 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -398,6 +398,11 @@ static const struct attribute_group bxtwc_group = {
 	.attrs = bxtwc_attrs,
 };
 
+static const struct attribute_group *bxtwc_groups[] = {
+	&bxtwc_group,
+	NULL
+};
+
 static const struct regmap_config bxtwc_regmap_config = {
 	.reg_bits = 16,
 	.val_bits = 8,
@@ -557,12 +562,6 @@ static int bxtwc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	ret = sysfs_create_group(&pdev->dev.kobj, &bxtwc_group);
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to create sysfs group %d\n", ret);
-		return ret;
-	}
-
 	/*
 	 * There is known hw bug. Upon reset BIT 5 of register
 	 * BXTWC_CHGR_LVL1_IRQ is 0 which is the expected value. However,
@@ -570,15 +569,7 @@ static int bxtwc_probe(struct platform_device *pdev)
 	 * have the software workaround here to unmaksed it in order to let
 	 * charger interrutp work.
 	 */
-	regmap_update_bits(pmic->regmap, BXTWC_MIRQLVL1,
-				BXTWC_MIRQLVL1_MCHGR, 0);
-
-	return 0;
-}
-
-static int bxtwc_remove(struct platform_device *pdev)
-{
-	sysfs_remove_group(&pdev->dev.kobj, &bxtwc_group);
+	regmap_update_bits(pmic->regmap, BXTWC_MIRQLVL1, BXTWC_MIRQLVL1_MCHGR, 0);
 
 	return 0;
 }
@@ -618,12 +609,12 @@ MODULE_DEVICE_TABLE(acpi, bxtwc_acpi_ids);
 
 static struct platform_driver bxtwc_driver = {
 	.probe = bxtwc_probe,
-	.remove	= bxtwc_remove,
 	.shutdown = bxtwc_shutdown,
 	.driver	= {
 		.name	= "BXTWC PMIC",
 		.pm     = &bxtwc_pm_ops,
 		.acpi_match_table = ACPI_PTR(bxtwc_acpi_ids),
+		.dev_groups = bxtwc_groups,
 	},
 };
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v1 03/11] mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata()
  2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
  2022-06-16 16:58 ` [PATCH v1 02/11] mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility Andy Shevchenko
@ 2022-06-16 16:58 ` Andy Shevchenko
  2022-06-27  9:08   ` Lee Jones
  2022-06-16 16:58 ` [PATCH v1 04/11] mfd: intel_soc_pmic_bxtwc: Use dev_err_probe() Andy Shevchenko
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-16 16:58 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Lee Jones

We have the specific helpers for platform device to set and get
its driver data. Convert driver to use them instead of open coded
variants.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index fbf421d56a73..b240baeb0c94 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -459,7 +459,7 @@ static int bxtwc_probe(struct platform_device *pdev)
 		return ret;
 	pmic->irq = ret;
 
-	dev_set_drvdata(&pdev->dev, pmic);
+	platform_set_drvdata(pdev, pmic);
 	pmic->dev = &pdev->dev;
 
 	pmic->scu = devm_intel_scu_ipc_dev_get(&pdev->dev);
@@ -576,7 +576,7 @@ static int bxtwc_probe(struct platform_device *pdev)
 
 static void bxtwc_shutdown(struct platform_device *pdev)
 {
-	struct intel_soc_pmic *pmic = dev_get_drvdata(&pdev->dev);
+	struct intel_soc_pmic *pmic = platform_get_drvdata(pdev);
 
 	disable_irq(pmic->irq);
 }
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v1 04/11] mfd: intel_soc_pmic_bxtwc: Use dev_err_probe()
  2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
  2022-06-16 16:58 ` [PATCH v1 02/11] mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility Andy Shevchenko
  2022-06-16 16:58 ` [PATCH v1 03/11] mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata() Andy Shevchenko
@ 2022-06-16 16:58 ` Andy Shevchenko
  2022-06-27  9:22   ` Lee Jones
  2022-06-16 16:58 ` [PATCH v1 05/11] mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device Andy Shevchenko
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-16 16:58 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Lee Jones

Simplify the mux error path a bit by using dev_err_probe().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 86 +++++++++---------------------
 1 file changed, 26 insertions(+), 60 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index b240baeb0c94..576fe55bd4d4 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -419,12 +419,9 @@ static int bxtwc_add_chained_irq_chip(struct intel_soc_pmic *pmic,
 	int irq;
 
 	irq = regmap_irq_get_virq(pdata, pirq);
-	if (irq < 0) {
-		dev_err(pmic->dev,
-			"Failed to get parent vIRQ(%d) for chip %s, ret:%d\n",
-			pirq, chip->name, irq);
-		return irq;
-	}
+	if (irq < 0)
+		return dev_err_probe(pmic->dev, irq, "Failed to get parent vIRQ(%d) for chip %s\n",
+				     pirq, chip->name);
 
 	return devm_regmap_add_irq_chip(pmic->dev, pmic->regmap, irq, irq_flags,
 					0, chip, data);
@@ -432,6 +429,7 @@ static int bxtwc_add_chained_irq_chip(struct intel_soc_pmic *pmic,
 
 static int bxtwc_probe(struct platform_device *pdev)
 {
+	struct device *dev = &pdev->dev;
 	int ret;
 	acpi_handle handle;
 	acpi_status status;
@@ -440,15 +438,10 @@ static int bxtwc_probe(struct platform_device *pdev)
 
 	handle = ACPI_HANDLE(&pdev->dev);
 	status = acpi_evaluate_integer(handle, "_HRV", NULL, &hrv);
-	if (ACPI_FAILURE(status)) {
-		dev_err(&pdev->dev, "Failed to get PMIC hardware revision\n");
-		return -ENODEV;
-	}
-	if (hrv != BROXTON_PMIC_WC_HRV) {
-		dev_err(&pdev->dev, "Invalid PMIC hardware revision: %llu\n",
-			hrv);
-		return -ENODEV;
-	}
+	if (ACPI_FAILURE(status))
+		return dev_err_probe(dev, -ENODEV, "Failed to get PMIC hardware revision\n");
+	if (hrv != BROXTON_PMIC_WC_HRV)
+		return dev_err_probe(dev, -ENODEV, "Invalid PMIC hardware revision: %llu\n", hrv);
 
 	pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
 	if (!pmic)
@@ -468,40 +461,31 @@ static int bxtwc_probe(struct platform_device *pdev)
 
 	pmic->regmap = devm_regmap_init(&pdev->dev, NULL, pmic,
 					&bxtwc_regmap_config);
-	if (IS_ERR(pmic->regmap)) {
-		ret = PTR_ERR(pmic->regmap);
-		dev_err(&pdev->dev, "Failed to initialise regmap: %d\n", ret);
-		return ret;
-	}
+	if (IS_ERR(pmic->regmap))
+		return dev_err_probe(dev, PTR_ERR(pmic->regmap), "Failed to initialise regmap\n");
 
 	ret = devm_regmap_add_irq_chip(&pdev->dev, pmic->regmap, pmic->irq,
 				       IRQF_ONESHOT | IRQF_SHARED,
 				       0, &bxtwc_regmap_irq_chip,
 				       &pmic->irq_chip_data);
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to add IRQ chip\n");
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to add IRQ chip\n");
 
 	ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
 					 BXTWC_PWRBTN_LVL1_IRQ,
 					 IRQF_ONESHOT,
 					 &bxtwc_regmap_irq_chip_pwrbtn,
 					 &pmic->irq_chip_data_pwrbtn);
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to add PWRBTN IRQ chip\n");
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to add PWRBTN IRQ chip\n");
 
 	ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
 					 BXTWC_TMU_LVL1_IRQ,
 					 IRQF_ONESHOT,
 					 &bxtwc_regmap_irq_chip_tmu,
 					 &pmic->irq_chip_data_tmu);
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to add TMU IRQ chip\n");
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to add TMU IRQ chip\n");
 
 	/* Add chained IRQ handler for BCU IRQs */
 	ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
@@ -509,12 +493,8 @@ static int bxtwc_probe(struct platform_device *pdev)
 					 IRQF_ONESHOT,
 					 &bxtwc_regmap_irq_chip_bcu,
 					 &pmic->irq_chip_data_bcu);
-
-
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to add BUC IRQ chip\n");
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to add BUC IRQ chip\n");
 
 	/* Add chained IRQ handler for ADC IRQs */
 	ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
@@ -522,12 +502,8 @@ static int bxtwc_probe(struct platform_device *pdev)
 					 IRQF_ONESHOT,
 					 &bxtwc_regmap_irq_chip_adc,
 					 &pmic->irq_chip_data_adc);
-
-
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to add ADC IRQ chip\n");
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to add ADC IRQ chip\n");
 
 	/* Add chained IRQ handler for CHGR IRQs */
 	ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
@@ -535,12 +511,8 @@ static int bxtwc_probe(struct platform_device *pdev)
 					 IRQF_ONESHOT,
 					 &bxtwc_regmap_irq_chip_chgr,
 					 &pmic->irq_chip_data_chgr);
-
-
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to add CHGR IRQ chip\n");
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to add CHGR IRQ chip\n");
 
 	/* Add chained IRQ handler for CRIT IRQs */
 	ret = bxtwc_add_chained_irq_chip(pmic, pmic->irq_chip_data,
@@ -548,19 +520,13 @@ static int bxtwc_probe(struct platform_device *pdev)
 					 IRQF_ONESHOT,
 					 &bxtwc_regmap_irq_chip_crit,
 					 &pmic->irq_chip_data_crit);
-
-
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to add CRIT IRQ chip\n");
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to add CRIT IRQ chip\n");
 
 	ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, bxt_wc_dev,
 				   ARRAY_SIZE(bxt_wc_dev), NULL, 0, NULL);
-	if (ret) {
-		dev_err(&pdev->dev, "Failed to add devices\n");
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to add devices\n");
 
 	/*
 	 * There is known hw bug. Upon reset BIT 5 of register
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v1 05/11] mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device
  2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
                   ` (2 preceding siblings ...)
  2022-06-16 16:58 ` [PATCH v1 04/11] mfd: intel_soc_pmic_bxtwc: Use dev_err_probe() Andy Shevchenko
@ 2022-06-16 16:58 ` Andy Shevchenko
  2022-06-27  9:27   ` Lee Jones
  2022-06-16 16:58 ` [PATCH v1 06/11] mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Andy Shevchenko
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-16 16:58 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Lee Jones

Extend use of temporary variable for struct device to make code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 576fe55bd4d4..a211c70d532b 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -431,19 +431,17 @@ static int bxtwc_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	int ret;
-	acpi_handle handle;
 	acpi_status status;
 	unsigned long long hrv;
 	struct intel_soc_pmic *pmic;
 
-	handle = ACPI_HANDLE(&pdev->dev);
-	status = acpi_evaluate_integer(handle, "_HRV", NULL, &hrv);
+	status = acpi_evaluate_integer(ACPI_HANDLE(dev), "_HRV", NULL, &hrv);
 	if (ACPI_FAILURE(status))
 		return dev_err_probe(dev, -ENODEV, "Failed to get PMIC hardware revision\n");
 	if (hrv != BROXTON_PMIC_WC_HRV)
 		return dev_err_probe(dev, -ENODEV, "Invalid PMIC hardware revision: %llu\n", hrv);
 
-	pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL);
+	pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL);
 	if (!pmic)
 		return -ENOMEM;
 
@@ -453,18 +451,17 @@ static int bxtwc_probe(struct platform_device *pdev)
 	pmic->irq = ret;
 
 	platform_set_drvdata(pdev, pmic);
-	pmic->dev = &pdev->dev;
+	pmic->dev = dev;
 
-	pmic->scu = devm_intel_scu_ipc_dev_get(&pdev->dev);
+	pmic->scu = devm_intel_scu_ipc_dev_get(dev);
 	if (!pmic->scu)
 		return -EPROBE_DEFER;
 
-	pmic->regmap = devm_regmap_init(&pdev->dev, NULL, pmic,
-					&bxtwc_regmap_config);
+	pmic->regmap = devm_regmap_init(dev, NULL, pmic, &bxtwc_regmap_config);
 	if (IS_ERR(pmic->regmap))
 		return dev_err_probe(dev, PTR_ERR(pmic->regmap), "Failed to initialise regmap\n");
 
-	ret = devm_regmap_add_irq_chip(&pdev->dev, pmic->regmap, pmic->irq,
+	ret = devm_regmap_add_irq_chip(dev, pmic->regmap, pmic->irq,
 				       IRQF_ONESHOT | IRQF_SHARED,
 				       0, &bxtwc_regmap_irq_chip,
 				       &pmic->irq_chip_data);
@@ -523,8 +520,8 @@ static int bxtwc_probe(struct platform_device *pdev)
 	if (ret)
 		return dev_err_probe(dev, ret, "Failed to add CRIT IRQ chip\n");
 
-	ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, bxt_wc_dev,
-				   ARRAY_SIZE(bxt_wc_dev), NULL, 0, NULL);
+	ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, bxt_wc_dev, ARRAY_SIZE(bxt_wc_dev),
+				   NULL, 0, NULL);
 	if (ret)
 		return dev_err_probe(dev, ret, "Failed to add devices\n");
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v1 06/11] mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc
  2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
                   ` (3 preceding siblings ...)
  2022-06-16 16:58 ` [PATCH v1 05/11] mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device Andy Shevchenko
@ 2022-06-16 16:58 ` Andy Shevchenko
  2022-06-27  9:27   ` Lee Jones
  2022-06-16 16:58 ` [PATCH v1 07/11] mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR() Andy Shevchenko
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-16 16:58 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Lee Jones

Letting 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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index a211c70d532b..6e4c2ca47d82 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -544,7 +544,6 @@ static void bxtwc_shutdown(struct platform_device *pdev)
 	disable_irq(pmic->irq);
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int bxtwc_suspend(struct device *dev)
 {
 	struct intel_soc_pmic *pmic = dev_get_drvdata(dev);
@@ -561,8 +560,8 @@ static int bxtwc_resume(struct device *dev)
 	enable_irq(pmic->irq);
 	return 0;
 }
-#endif
-static SIMPLE_DEV_PM_OPS(bxtwc_pm_ops, bxtwc_suspend, bxtwc_resume);
+
+static DEFINE_SIMPLE_DEV_PM_OPS(bxtwc_pm_ops, bxtwc_suspend, bxtwc_resume);
 
 static const struct acpi_device_id bxtwc_acpi_ids[] = {
 	{ "INT34D3", },
@@ -575,7 +574,7 @@ static struct platform_driver bxtwc_driver = {
 	.shutdown = bxtwc_shutdown,
 	.driver	= {
 		.name	= "BXTWC PMIC",
-		.pm     = &bxtwc_pm_ops,
+		.pm     = pm_sleep_ptr(&bxtwc_pm_ops),
 		.acpi_match_table = ACPI_PTR(bxtwc_acpi_ids),
 		.dev_groups = bxtwc_groups,
 	},
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v1 07/11] mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR()
  2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
                   ` (4 preceding siblings ...)
  2022-06-16 16:58 ` [PATCH v1 06/11] mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Andy Shevchenko
@ 2022-06-16 16:58 ` Andy Shevchenko
  2022-06-27  9:28   ` Lee Jones
  2022-06-16 16:58 ` [PATCH v1 08/11] mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks Andy Shevchenko
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-16 16:58 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Lee Jones

The driver depends on ACPI (via MFD_INTEL_PMC_BXT), 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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 6e4c2ca47d82..b48e620de7a3 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -575,7 +575,7 @@ static struct platform_driver bxtwc_driver = {
 	.driver	= {
 		.name	= "BXTWC PMIC",
 		.pm     = pm_sleep_ptr(&bxtwc_pm_ops),
-		.acpi_match_table = ACPI_PTR(bxtwc_acpi_ids),
+		.acpi_match_table = bxtwc_acpi_ids,
 		.dev_groups = bxtwc_groups,
 	},
 };
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v1 08/11] mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks
  2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
                   ` (5 preceding siblings ...)
  2022-06-16 16:58 ` [PATCH v1 07/11] mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR() Andy Shevchenko
@ 2022-06-16 16:58 ` Andy Shevchenko
  2022-06-27  9:30   ` Lee Jones
  2022-06-16 16:58 ` [PATCH v1 09/11] mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf() Andy Shevchenko
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-16 16:58 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Lee Jones

Currently we are using BIT(), but GENMASK(). Make use of the latter one
as well (far less error-prone, far more concise).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index b48e620de7a3..529aec38389c 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -6,6 +6,7 @@
  */
 
 #include <linux/acpi.h>
+#include <linux/bits.h>
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/interrupt.h>
@@ -18,9 +19,9 @@
 #include <asm/intel_scu_ipc.h>
 
 /* PMIC device registers */
-#define REG_ADDR_MASK		0xFF00
+#define REG_ADDR_MASK		GENMASK(15, 8)
 #define REG_ADDR_SHIFT		8
-#define REG_OFFSET_MASK		0xFF
+#define REG_OFFSET_MASK		GENMASK(7, 0)
 
 /* Interrupt Status Registers */
 #define BXTWC_IRQLVL1		0x4E02
@@ -112,29 +113,29 @@ static const struct regmap_irq bxtwc_regmap_irqs[] = {
 };
 
 static const struct regmap_irq bxtwc_regmap_irqs_pwrbtn[] = {
-	REGMAP_IRQ_REG(BXTWC_PWRBTN_IRQ, 0, 0x01),
+	REGMAP_IRQ_REG(BXTWC_PWRBTN_IRQ, 0, BIT(0)),
 };
 
 static const struct regmap_irq bxtwc_regmap_irqs_bcu[] = {
-	REGMAP_IRQ_REG(BXTWC_BCU_IRQ, 0, 0x1f),
+	REGMAP_IRQ_REG(BXTWC_BCU_IRQ, 0, GENMASK(4, 0)),
 };
 
 static const struct regmap_irq bxtwc_regmap_irqs_adc[] = {
-	REGMAP_IRQ_REG(BXTWC_ADC_IRQ, 0, 0xff),
+	REGMAP_IRQ_REG(BXTWC_ADC_IRQ, 0, GENMASK(7, 0)),
 };
 
 static const struct regmap_irq bxtwc_regmap_irqs_chgr[] = {
-	REGMAP_IRQ_REG(BXTWC_USBC_IRQ, 0, 0x20),
-	REGMAP_IRQ_REG(BXTWC_CHGR0_IRQ, 0, 0x1f),
-	REGMAP_IRQ_REG(BXTWC_CHGR1_IRQ, 1, 0x1f),
+	REGMAP_IRQ_REG(BXTWC_USBC_IRQ, 0, BIT(5)),
+	REGMAP_IRQ_REG(BXTWC_CHGR0_IRQ, 0, GENMASK(4, 0)),
+	REGMAP_IRQ_REG(BXTWC_CHGR1_IRQ, 1, GENMASK(4, 0)),
 };
 
 static const struct regmap_irq bxtwc_regmap_irqs_tmu[] = {
-	REGMAP_IRQ_REG(BXTWC_TMU_IRQ, 0, 0x06),
+	REGMAP_IRQ_REG(BXTWC_TMU_IRQ, 0, GENMASK(2, 1)),
 };
 
 static const struct regmap_irq bxtwc_regmap_irqs_crit[] = {
-	REGMAP_IRQ_REG(BXTWC_CRIT_IRQ, 0, 0x03),
+	REGMAP_IRQ_REG(BXTWC_CRIT_IRQ, 0, GENMASK(1, 0)),
 };
 
 static struct regmap_irq_chip bxtwc_regmap_irq_chip = {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v1 09/11] mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf()
  2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
                   ` (6 preceding siblings ...)
  2022-06-16 16:58 ` [PATCH v1 08/11] mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks Andy Shevchenko
@ 2022-06-16 16:58 ` Andy Shevchenko
  2022-06-27  9:30   ` Lee Jones
  2022-06-16 16:58 ` [PATCH v1 10/11] mfd: intel_soc_pmic_bxtwc: Drop unneeded casting Andy Shevchenko
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-16 16:58 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Lee Jones

sysfs_emit() is preferred over sprintf() when formatting the value to be
returned to user space in show() functions, because it knows about sysfs
buffer specifics and has sanity checks.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 529aec38389c..4e890f095721 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -334,7 +334,7 @@ static unsigned long bxtwc_reg_addr;
 static ssize_t addr_show(struct device *dev,
 			 struct device_attribute *attr, char *buf)
 {
-	return sprintf(buf, "0x%lx\n", bxtwc_reg_addr);
+	return sysfs_emit(buf, "0x%lx\n", bxtwc_reg_addr);
 }
 
 static ssize_t addr_store(struct device *dev,
@@ -364,7 +364,7 @@ static ssize_t val_show(struct device *dev,
 		return ret;
 	}
 
-	return sprintf(buf, "0x%02x\n", val);
+	return sysfs_emit(buf, "0x%02x\n", val);
 }
 
 static ssize_t val_store(struct device *dev,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v1 10/11] mfd: intel_soc_pmic_bxtwc: Drop unneeded casting
  2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
                   ` (7 preceding siblings ...)
  2022-06-16 16:58 ` [PATCH v1 09/11] mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf() Andy Shevchenko
@ 2022-06-16 16:58 ` Andy Shevchenko
  2022-06-27  9:31   ` Lee Jones
  2022-06-16 16:58 ` [PATCH v1 11/11] mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment Andy Shevchenko
  2022-06-27  9:05 ` [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Lee Jones
  10 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-16 16:58 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Lee Jones

The casting from size_t to ssize_t is not needed in addr_store(),
drop it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 4e890f095721..953f535a3c93 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -348,7 +348,7 @@ static ssize_t addr_store(struct device *dev,
 		return ret;
 	}
 
-	return (ssize_t)count;
+	return count;
 }
 
 static ssize_t val_show(struct device *dev,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v1 11/11] mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment
  2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
                   ` (8 preceding siblings ...)
  2022-06-16 16:58 ` [PATCH v1 10/11] mfd: intel_soc_pmic_bxtwc: Drop unneeded casting Andy Shevchenko
@ 2022-06-16 16:58 ` Andy Shevchenko
  2022-06-27  9:33   ` Lee Jones
  2022-06-27  9:05 ` [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Lee Jones
  10 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-16 16:58 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Andy Shevchenko, Lee Jones

There are a couple of spelling issues in the comment, fix them.
While at it, fix indentation in the MODULE_AUTHOR() parameter
and update copyright years.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 953f535a3c93..9e412d1d00f1 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -2,7 +2,7 @@
 /*
  * MFD core driver for Intel Broxton Whiskey Cove PMIC
  *
- * Copyright (C) 2015 Intel Corporation. All rights reserved.
+ * Copyright (C) 2015-2017, 2022 Intel Corporation. All rights reserved.
  */
 
 #include <linux/acpi.h>
@@ -527,11 +527,11 @@ static int bxtwc_probe(struct platform_device *pdev)
 		return dev_err_probe(dev, ret, "Failed to add devices\n");
 
 	/*
-	 * There is known hw bug. Upon reset BIT 5 of register
+	 * There is known HW bug. Upon reset BIT 5 of register
 	 * BXTWC_CHGR_LVL1_IRQ is 0 which is the expected value. However,
 	 * later it's set to 1(masked) automatically by hardware. So we
-	 * have the software workaround here to unmaksed it in order to let
-	 * charger interrutp work.
+	 * have the software workaround here to unmasked it in order to let
+	 * charger interrupt work.
 	 */
 	regmap_update_bits(pmic->regmap, BXTWC_MIRQLVL1, BXTWC_MIRQLVL1_MCHGR, 0);
 
@@ -584,4 +584,4 @@ static struct platform_driver bxtwc_driver = {
 module_platform_driver(bxtwc_driver);
 
 MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Qipeng Zha<qipeng.zha@intel.com>");
+MODULE_AUTHOR("Qipeng Zha <qipeng.zha@intel.com>");
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store()
  2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
                   ` (9 preceding siblings ...)
  2022-06-16 16:58 ` [PATCH v1 11/11] mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment Andy Shevchenko
@ 2022-06-27  9:05 ` Lee Jones
  2022-06-28  9:45   ` Andy Shevchenko
  10 siblings, 1 reply; 29+ messages in thread
From: Lee Jones @ 2022-06-27  9:05 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Thu, 16 Jun 2022, Andy Shevchenko wrote:

> kstrtox() along with regmap API can return different error codes based on
> circumstances.
> 
> Don't shadow them when returning to the caller.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
> index bc069c4daa60..3148a319d467 100644
> --- a/drivers/mfd/intel_soc_pmic_bxtwc.c
> +++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
> @@ -339,10 +339,14 @@ static ssize_t addr_show(struct device *dev,
>  static ssize_t addr_store(struct device *dev,
>  			  struct device_attribute *attr, const char *buf, size_t count)
>  {
> -	if (kstrtoul(buf, 0, &bxtwc_reg_addr)) {
> +	int ret;
> +
> +	ret = kstrtoul(buf, 0, &bxtwc_reg_addr);
> +	if (ret) {
>  		dev_err(dev, "Invalid register address\n");

Is that really what failure means, on every failure?

  "Returns 0 on success, -ERANGE on overflow and -EINVAL on parsing
   error."

> -		return -EINVAL;
> +		return ret;
>  	}
> +
>  	return (ssize_t)count;
>  }
>  
> @@ -354,9 +358,9 @@ static ssize_t val_show(struct device *dev,
>  	struct intel_soc_pmic *pmic = dev_get_drvdata(dev);
>  
>  	ret = regmap_read(pmic->regmap, bxtwc_reg_addr, &val);
> -	if (ret < 0) {
> +	if (ret) {
>  		dev_err(dev, "Failed to read 0x%lx\n", bxtwc_reg_addr);
> -		return -EIO;
> +		return ret;
>  	}
>  
>  	return sprintf(buf, "0x%02x\n", val);
> @@ -377,7 +381,7 @@ static ssize_t val_store(struct device *dev,
>  	if (ret) {
>  		dev_err(dev, "Failed to write value 0x%02x to address 0x%lx",
>  			val, bxtwc_reg_addr);
> -		return -EIO;
> +		return ret;
>  	}
>  	return count;
>  }

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 02/11] mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility
  2022-06-16 16:58 ` [PATCH v1 02/11] mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility Andy Shevchenko
@ 2022-06-27  9:07   ` Lee Jones
  0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2022-06-27  9:07 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Thu, 16 Jun 2022, Andy Shevchenko wrote:

> Driver core takes care of sysfs attributes. Use this facility instead of
> doing it explicitly in ->probe() and ->remove().
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 23 +++++++----------------
>  1 file changed, 7 insertions(+), 16 deletions(-)

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 03/11] mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata()
  2022-06-16 16:58 ` [PATCH v1 03/11] mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata() Andy Shevchenko
@ 2022-06-27  9:08   ` Lee Jones
  0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2022-06-27  9:08 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Thu, 16 Jun 2022, Andy Shevchenko wrote:

> We have the specific helpers for platform device to set and get
> its driver data. Convert driver to use them instead of open coded
> variants.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 04/11] mfd: intel_soc_pmic_bxtwc: Use dev_err_probe()
  2022-06-16 16:58 ` [PATCH v1 04/11] mfd: intel_soc_pmic_bxtwc: Use dev_err_probe() Andy Shevchenko
@ 2022-06-27  9:22   ` Lee Jones
  0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2022-06-27  9:22 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Thu, 16 Jun 2022, Andy Shevchenko wrote:

> Simplify the mux error path a bit by using dev_err_probe().
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 86 +++++++++---------------------
>  1 file changed, 26 insertions(+), 60 deletions(-)

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 05/11] mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device
  2022-06-16 16:58 ` [PATCH v1 05/11] mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device Andy Shevchenko
@ 2022-06-27  9:27   ` Lee Jones
  0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2022-06-27  9:27 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Thu, 16 Jun 2022, Andy Shevchenko wrote:

> Extend use of temporary variable for struct device to make code neater.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 06/11] mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc
  2022-06-16 16:58 ` [PATCH v1 06/11] mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Andy Shevchenko
@ 2022-06-27  9:27   ` Lee Jones
  0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2022-06-27  9:27 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Thu, 16 Jun 2022, Andy Shevchenko wrote:

> Letting 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.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 07/11] mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR()
  2022-06-16 16:58 ` [PATCH v1 07/11] mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR() Andy Shevchenko
@ 2022-06-27  9:28   ` Lee Jones
  0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2022-06-27  9:28 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Thu, 16 Jun 2022, Andy Shevchenko wrote:

> The driver depends on ACPI (via MFD_INTEL_PMC_BXT), 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.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 08/11] mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks
  2022-06-16 16:58 ` [PATCH v1 08/11] mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks Andy Shevchenko
@ 2022-06-27  9:30   ` Lee Jones
  0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2022-06-27  9:30 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Thu, 16 Jun 2022, Andy Shevchenko wrote:
65;6800;1c
> Currently we are using BIT(), but GENMASK(). Make use of the latter one
> as well (far less error-prone, far more concise).
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 21 +++++++++++----------
>  1 file changed, 11 insertions(+), 10 deletions(-)

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 09/11] mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf()
  2022-06-16 16:58 ` [PATCH v1 09/11] mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf() Andy Shevchenko
@ 2022-06-27  9:30   ` Lee Jones
  0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2022-06-27  9:30 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Thu, 16 Jun 2022, Andy Shevchenko wrote:

> sysfs_emit() is preferred over sprintf() when formatting the value to be
> returned to user space in show() functions, because it knows about sysfs
> buffer specifics and has sanity checks.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 10/11] mfd: intel_soc_pmic_bxtwc: Drop unneeded casting
  2022-06-16 16:58 ` [PATCH v1 10/11] mfd: intel_soc_pmic_bxtwc: Drop unneeded casting Andy Shevchenko
@ 2022-06-27  9:31   ` Lee Jones
  0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2022-06-27  9:31 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Thu, 16 Jun 2022, Andy Shevchenko wrote:

> The casting from size_t to ssize_t is not needed in addr_store(),
> drop it.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

For my own reference (apply this as-is to your sign-off block):

  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 11/11] mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment
  2022-06-16 16:58 ` [PATCH v1 11/11] mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment Andy Shevchenko
@ 2022-06-27  9:33   ` Lee Jones
  2022-06-28  9:38     ` Andy Shevchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Lee Jones @ 2022-06-27  9:33 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Thu, 16 Jun 2022, Andy Shevchenko wrote:

> There are a couple of spelling issues in the comment, fix them.
> While at it, fix indentation in the MODULE_AUTHOR() parameter
> and update copyright years.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mfd/intel_soc_pmic_bxtwc.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
> index 953f535a3c93..9e412d1d00f1 100644
> --- a/drivers/mfd/intel_soc_pmic_bxtwc.c
> +++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
> @@ -2,7 +2,7 @@
>  /*
>   * MFD core driver for Intel Broxton Whiskey Cove PMIC
>   *
> - * Copyright (C) 2015 Intel Corporation. All rights reserved.
> + * Copyright (C) 2015-2017, 2022 Intel Corporation. All rights reserved.

I do not profess to be an expert.  What happened between 2017-2022?

>   */
>  
>  #include <linux/acpi.h>
> @@ -527,11 +527,11 @@ static int bxtwc_probe(struct platform_device *pdev)
>  		return dev_err_probe(dev, ret, "Failed to add devices\n");
>  
>  	/*
> -	 * There is known hw bug. Upon reset BIT 5 of register
> +	 * There is known HW bug. Upon reset BIT 5 of register

You may as well fix the grammar while you're at it.

>  	 * BXTWC_CHGR_LVL1_IRQ is 0 which is the expected value. However,
>  	 * later it's set to 1(masked) automatically by hardware. So we
> -	 * have the software workaround here to unmaksed it in order to let
> -	 * charger interrutp work.
> +	 * have the software workaround here to unmasked it in order to let
> +	 * charger interrupt work.

Likewise.

>  	 */
>  	regmap_update_bits(pmic->regmap, BXTWC_MIRQLVL1, BXTWC_MIRQLVL1_MCHGR, 0);
>  
> @@ -584,4 +584,4 @@ static struct platform_driver bxtwc_driver = {
>  module_platform_driver(bxtwc_driver);
>  
>  MODULE_LICENSE("GPL v2");
> -MODULE_AUTHOR("Qipeng Zha<qipeng.zha@intel.com>");
> +MODULE_AUTHOR("Qipeng Zha <qipeng.zha@intel.com>");

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 11/11] mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment
  2022-06-27  9:33   ` Lee Jones
@ 2022-06-28  9:38     ` Andy Shevchenko
  2022-06-28  9:56       ` Lee Jones
  0 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-28  9:38 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Andy Shevchenko

On Mon, Jun 27, 2022 at 10:33:17AM +0100, Lee Jones wrote:
> On Thu, 16 Jun 2022, Andy Shevchenko wrote:

...

> > - * Copyright (C) 2015 Intel Corporation. All rights reserved.
> > + * Copyright (C) 2015-2017, 2022 Intel Corporation. All rights reserved.
> 
> I do not profess to be an expert.  What happened between 2017-2022?

Nothing?

I mean that before I become a reviewer/maintainer of this code I have no
evidence that anyone at Intel worked on the code (I mean really working,
not some whitespace cleanup). After that I don't remember I was doing
anything (important) either.

...

> > -	 * There is known hw bug. Upon reset BIT 5 of register
> > +	 * There is known HW bug. Upon reset BIT 5 of register
> 
> You may as well fix the grammar while you're at it.

Any suggestion from a native speaker? I can propose a few changes, but I'm
totally unsure.

> >  	 * BXTWC_CHGR_LVL1_IRQ is 0 which is the expected value. However,
> >  	 * later it's set to 1(masked) automatically by hardware. So we
> > -	 * have the software workaround here to unmaksed it in order to let
> > -	 * charger interrutp work.
> > +	 * have the software workaround here to unmasked it in order to let
> > +	 * charger interrupt work.
> 
> Likewise.

Likewise.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store()
  2022-06-27  9:05 ` [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Lee Jones
@ 2022-06-28  9:45   ` Andy Shevchenko
  2022-06-28  9:47     ` Lee Jones
  0 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-28  9:45 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Andy Shevchenko

On Mon, Jun 27, 2022 at 10:05:07AM +0100, Lee Jones wrote:
> On Thu, 16 Jun 2022, Andy Shevchenko wrote:

...

> > +	ret = kstrtoul(buf, 0, &bxtwc_reg_addr);
> > +	if (ret) {
> >  		dev_err(dev, "Invalid register address\n");
> 
> Is that really what failure means, on every failure?
> 
>   "Returns 0 on success, -ERANGE on overflow and -EINVAL on parsing
>    error."

As far as I can see in either case the address is invalid.
Basically we may drop this confusing error message here, if
this what you prefer.

> > -		return -EINVAL;
> > +		return ret;
> >  	}

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store()
  2022-06-28  9:45   ` Andy Shevchenko
@ 2022-06-28  9:47     ` Lee Jones
  2022-06-28 10:38       ` Andy Shevchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Lee Jones @ 2022-06-28  9:47 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Tue, 28 Jun 2022, Andy Shevchenko wrote:

> On Mon, Jun 27, 2022 at 10:05:07AM +0100, Lee Jones wrote:
> > On Thu, 16 Jun 2022, Andy Shevchenko wrote:
> 
> ...
> 
> > > +	ret = kstrtoul(buf, 0, &bxtwc_reg_addr);
> > > +	if (ret) {
> > >  		dev_err(dev, "Invalid register address\n");
> > 
> > Is that really what failure means, on every failure?
> > 
> >   "Returns 0 on success, -ERANGE on overflow and -EINVAL on parsing
> >    error."
> 
> As far as I can see in either case the address is invalid.
> Basically we may drop this confusing error message here, if
> this what you prefer.

Your call.  I just wanted you to consider it for a moment.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 11/11] mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment
  2022-06-28  9:38     ` Andy Shevchenko
@ 2022-06-28  9:56       ` Lee Jones
  2022-06-28 10:36         ` Andy Shevchenko
  0 siblings, 1 reply; 29+ messages in thread
From: Lee Jones @ 2022-06-28  9:56 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Tue, 28 Jun 2022, Andy Shevchenko wrote:
> On Mon, Jun 27, 2022 at 10:33:17AM +0100, Lee Jones wrote:
> > On Thu, 16 Jun 2022, Andy Shevchenko wrote:
> 
> > > -	 * There is known hw bug. Upon reset BIT 5 of register
> > > +	 * There is known HW bug. Upon reset BIT 5 of register
> > 
> > You may as well fix the grammar while you're at it.
> 
> Any suggestion from a native speaker? I can propose a few changes, but I'm
> totally unsure.

No massive changes, just:

* There is a known H/W bug. Upon reset, BIT 5 of register
           -       ---                -

> > >  	 * BXTWC_CHGR_LVL1_IRQ is 0 which is the expected value. However,
> > >  	 * later it's set to 1(masked) automatically by hardware. So we
> > > -	 * have the software workaround here to unmaksed it in order to let
> > > -	 * charger interrutp work.
> > > +	 * have the software workaround here to unmasked it in order to let
> > > +	 * charger interrupt work.

* place a software workaround here to unmask it again in order to re-enable
  -------                             ------    -----             ---------

* the charger interrupt.
  ---

Something like that.  Feel free to adapt it further as you see fit.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 11/11] mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment
  2022-06-28  9:56       ` Lee Jones
@ 2022-06-28 10:36         ` Andy Shevchenko
  0 siblings, 0 replies; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-28 10:36 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Andy Shevchenko

On Tue, Jun 28, 2022 at 10:56:31AM +0100, Lee Jones wrote:
> On Tue, 28 Jun 2022, Andy Shevchenko wrote:
> > On Mon, Jun 27, 2022 at 10:33:17AM +0100, Lee Jones wrote:
> > > On Thu, 16 Jun 2022, Andy Shevchenko wrote:
> > 
> > > > -	 * There is known hw bug. Upon reset BIT 5 of register
> > > > +	 * There is known HW bug. Upon reset BIT 5 of register
> > > 
> > > You may as well fix the grammar while you're at it.
> > 
> > Any suggestion from a native speaker? I can propose a few changes, but I'm
> > totally unsure.
> 
> No massive changes, just:
> 
> * There is a known H/W bug. Upon reset, BIT 5 of register
>            -       ---                -
> 
> > > >  	 * BXTWC_CHGR_LVL1_IRQ is 0 which is the expected value. However,
> > > >  	 * later it's set to 1(masked) automatically by hardware. So we
> > > > -	 * have the software workaround here to unmaksed it in order to let
> > > > -	 * charger interrutp work.
> > > > +	 * have the software workaround here to unmasked it in order to let
> > > > +	 * charger interrupt work.
> 
> * place a software workaround here to unmask it again in order to re-enable
>   -------                             ------    -----             ---------
> 
> * the charger interrupt.
>   ---
> 
> Something like that.  Feel free to adapt it further as you see fit.

Thank you, Lee, I will do as suggested!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store()
  2022-06-28  9:47     ` Lee Jones
@ 2022-06-28 10:38       ` Andy Shevchenko
  2022-06-29 14:34         ` Lee Jones
  0 siblings, 1 reply; 29+ messages in thread
From: Andy Shevchenko @ 2022-06-28 10:38 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-kernel, Andy Shevchenko

On Tue, Jun 28, 2022 at 10:47:10AM +0100, Lee Jones wrote:
> On Tue, 28 Jun 2022, Andy Shevchenko wrote:
> > On Mon, Jun 27, 2022 at 10:05:07AM +0100, Lee Jones wrote:
> > > On Thu, 16 Jun 2022, Andy Shevchenko wrote:

...

> > > > +	ret = kstrtoul(buf, 0, &bxtwc_reg_addr);
> > > > +	if (ret) {
> > > >  		dev_err(dev, "Invalid register address\n");
> > > 
> > > Is that really what failure means, on every failure?
> > > 
> > >   "Returns 0 on success, -ERANGE on overflow and -EINVAL on parsing
> > >    error."
> > 
> > As far as I can see in either case the address is invalid.
> > Basically we may drop this confusing error message here, if
> > this what you prefer.
> 
> Your call.  I just wanted you to consider it for a moment.

Userspace will print an error based on the error code, so
I would rather remove _this_ message since it doesn't add
value, esp. when we could have -ERANGE.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store()
  2022-06-28 10:38       ` Andy Shevchenko
@ 2022-06-29 14:34         ` Lee Jones
  0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2022-06-29 14:34 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Andy Shevchenko

On Tue, 28 Jun 2022, Andy Shevchenko wrote:

> On Tue, Jun 28, 2022 at 10:47:10AM +0100, Lee Jones wrote:
> > On Tue, 28 Jun 2022, Andy Shevchenko wrote:
> > > On Mon, Jun 27, 2022 at 10:05:07AM +0100, Lee Jones wrote:
> > > > On Thu, 16 Jun 2022, Andy Shevchenko wrote:
> 
> ...
> 
> > > > > +	ret = kstrtoul(buf, 0, &bxtwc_reg_addr);
> > > > > +	if (ret) {
> > > > >  		dev_err(dev, "Invalid register address\n");
> > > > 
> > > > Is that really what failure means, on every failure?
> > > > 
> > > >   "Returns 0 on success, -ERANGE on overflow and -EINVAL on parsing
> > > >    error."
> > > 
> > > As far as I can see in either case the address is invalid.
> > > Basically we may drop this confusing error message here, if
> > > this what you prefer.
> > 
> > Your call.  I just wanted you to consider it for a moment.
> 
> Userspace will print an error based on the error code, so
> I would rather remove _this_ message since it doesn't add
> value, esp. when we could have -ERANGE.

Works for me.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2022-06-29 14:34 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 16:58 [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Andy Shevchenko
2022-06-16 16:58 ` [PATCH v1 02/11] mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility Andy Shevchenko
2022-06-27  9:07   ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 03/11] mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata() Andy Shevchenko
2022-06-27  9:08   ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 04/11] mfd: intel_soc_pmic_bxtwc: Use dev_err_probe() Andy Shevchenko
2022-06-27  9:22   ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 05/11] mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device Andy Shevchenko
2022-06-27  9:27   ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 06/11] mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Andy Shevchenko
2022-06-27  9:27   ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 07/11] mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR() Andy Shevchenko
2022-06-27  9:28   ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 08/11] mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks Andy Shevchenko
2022-06-27  9:30   ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 09/11] mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf() Andy Shevchenko
2022-06-27  9:30   ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 10/11] mfd: intel_soc_pmic_bxtwc: Drop unneeded casting Andy Shevchenko
2022-06-27  9:31   ` Lee Jones
2022-06-16 16:58 ` [PATCH v1 11/11] mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment Andy Shevchenko
2022-06-27  9:33   ` Lee Jones
2022-06-28  9:38     ` Andy Shevchenko
2022-06-28  9:56       ` Lee Jones
2022-06-28 10:36         ` Andy Shevchenko
2022-06-27  9:05 ` [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store() Lee Jones
2022-06-28  9:45   ` Andy Shevchenko
2022-06-28  9:47     ` Lee Jones
2022-06-28 10:38       ` Andy Shevchenko
2022-06-29 14:34         ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.