linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] i2c: Adding support for software nodes
@ 2021-03-29 10:50 Heikki Krogerus
  2021-03-29 10:50 ` [PATCH 01/12] i2c: Add " Heikki Krogerus
                   ` (14 more replies)
  0 siblings, 15 replies; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel

Hi,

The old device property API (device_add_properties()) is going to be
removed. These prepare the i2c subsystem and drivers for the change.
The change is fairly trivial in case of i2c. All we need to do is add
complete software nodes to the devices instead of only the device
properties in those nodes.

thanks,

Heikki Krogerus (12):
  i2c: Add support for software nodes
  ARM: davinci: Constify the software nodes
  ARM: omap1: osk: Constify the software node
  ARM: pxa: stargate2: Constify the software node
  ARM: s3c: mini2440: Constify the software node
  platform/x86: intel_cht_int33fe_microb: Constify the software node
  i2c: cht-wc: Constify the software node
  i2c: nvidia-gpu: Constify the software node
  i2c: icy: Constify the software node
  platform/chrome: chromeos_laptop - Prepare complete software nodes
  Input: elantech - Prepare a complete software node for the device
  i2c: Remove support for dangling device properties

 arch/arm/mach-davinci/board-da830-evm.c       |   6 +-
 arch/arm/mach-davinci/board-dm365-evm.c       |   6 +-
 arch/arm/mach-davinci/board-dm644x-evm.c      |   6 +-
 arch/arm/mach-davinci/board-dm646x-evm.c      |   6 +-
 arch/arm/mach-davinci/board-mityomapl138.c    |   6 +-
 arch/arm/mach-davinci/board-sffsdr.c          |   6 +-
 arch/arm/mach-omap1/board-osk.c               |   6 +-
 arch/arm/mach-pxa/stargate2.c                 |   6 +-
 arch/arm/mach-s3c/mach-mini2440.c             |   6 +-
 drivers/i2c/busses/i2c-cht-wc.c               |   6 +-
 drivers/i2c/busses/i2c-icy.c                  |  32 ++----
 drivers/i2c/busses/i2c-nvidia-gpu.c           |   6 +-
 drivers/i2c/i2c-boardinfo.c                   |  11 --
 drivers/i2c/i2c-core-base.c                   |  14 +--
 drivers/input/mouse/elantech.c                |   6 +-
 drivers/platform/chrome/chromeos_laptop.c     | 100 +++++++++++-------
 .../platform/x86/intel_cht_int33fe_microb.c   |   6 +-
 include/linux/i2c.h                           |   4 +-
 18 files changed, 142 insertions(+), 97 deletions(-)

-- 
2.30.2


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

* [PATCH 01/12] i2c: Add support for software nodes
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-03-29 10:50 ` [PATCH 02/12] ARM: davinci: Constify the " Heikki Krogerus
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel

This makes it possible for the drivers to assign complete
software fwnodes to the devices instead of only the device
properties in those nodes.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/i2c/i2c-core-base.c | 15 ++++++++++++++-
 include/linux/i2c.h         |  4 +++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index f21362355973e..a6a68081f54e1 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -920,15 +920,27 @@ i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf
 		}
 	}
 
+	if (info->swnode) {
+		status = device_add_software_node(&client->dev, info->swnode);
+		if (status) {
+			dev_err(&adap->dev,
+				"Failed to add software node to client %s: %d\n",
+				client->name, status);
+			goto out_free_props;
+		}
+	}
+
 	status = device_register(&client->dev);
 	if (status)
-		goto out_free_props;
+		goto out_remove_swnode;
 
 	dev_dbg(&adap->dev, "client [%s] registered with bus id %s\n",
 		client->name, dev_name(&client->dev));
 
 	return client;
 
+out_remove_swnode:
+	device_remove_software_node(&client->dev);
 out_free_props:
 	if (info->properties)
 		device_remove_properties(&client->dev);
@@ -961,6 +973,7 @@ void i2c_unregister_device(struct i2c_client *client)
 
 	if (ACPI_COMPANION(&client->dev))
 		acpi_device_clear_enumerated(ACPI_COMPANION(&client->dev));
+	device_remove_software_node(&client->dev);
 	device_unregister(&client->dev);
 }
 EXPORT_SYMBOL_GPL(i2c_unregister_device);
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 56622658b2158..cb1f882a3e88e 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -391,7 +391,8 @@ static inline bool i2c_detect_slave_mode(struct device *dev) { return false; }
  * @platform_data: stored in i2c_client.dev.platform_data
  * @of_node: pointer to OpenFirmware device node
  * @fwnode: device node supplied by the platform firmware
- * @properties: additional device properties for the device
+ * @properties: Deprecated - use swnode instead
+ * @swnode: software node for the device
  * @resources: resources associated with the device
  * @num_resources: number of resources in the @resources array
  * @irq: stored in i2c_client.irq
@@ -416,6 +417,7 @@ struct i2c_board_info {
 	struct device_node *of_node;
 	struct fwnode_handle *fwnode;
 	const struct property_entry *properties;
+	const struct software_node *swnode;
 	const struct resource *resources;
 	unsigned int	num_resources;
 	int		irq;
-- 
2.30.2


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

* [PATCH 02/12] ARM: davinci: Constify the software nodes
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
  2021-03-29 10:50 ` [PATCH 01/12] i2c: Add " Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-04-06 19:38   ` Wolfram Sang
  2021-03-29 10:50 ` [PATCH 03/12] ARM: omap1: osk: Constify the software node Heikki Krogerus
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Sekhar Nori, Bartosz Golaszewski

Additional device properties are always just a part of a
software fwnode. If the device properties are constant, the
software node can also be constant.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/board-da830-evm.c    | 6 +++++-
 arch/arm/mach-davinci/board-dm365-evm.c    | 6 +++++-
 arch/arm/mach-davinci/board-dm644x-evm.c   | 6 +++++-
 arch/arm/mach-davinci/board-dm646x-evm.c   | 6 +++++-
 arch/arm/mach-davinci/board-mityomapl138.c | 6 +++++-
 arch/arm/mach-davinci/board-sffsdr.c       | 6 +++++-
 6 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index a20ba12d876c6..823c9cc98f18b 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -454,6 +454,10 @@ static const struct property_entry da830_evm_i2c_eeprom_properties[] = {
 	{ }
 };
 
+static const struct software_node da830_evm_i2c_eeprom_node = {
+	.properties = da830_evm_i2c_eeprom_properties,
+};
+
 static int __init da830_evm_ui_expander_setup(struct i2c_client *client,
 		int gpio, unsigned ngpio, void *context)
 {
@@ -485,7 +489,7 @@ static struct pcf857x_platform_data __initdata da830_evm_ui_expander_info = {
 static struct i2c_board_info __initdata da830_evm_i2c_devices[] = {
 	{
 		I2C_BOARD_INFO("24c256", 0x50),
-		.properties = da830_evm_i2c_eeprom_properties,
+		.swnode = &da830_evm_i2c_eeprom_node,
 	},
 	{
 		I2C_BOARD_INFO("tlv320aic3x", 0x18),
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index bdf31eb776204..b3bef74c982a3 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -232,10 +232,14 @@ static const struct property_entry eeprom_properties[] = {
 	{ }
 };
 
+static const struct software_node eeprom_node = {
+	.properties = eeprom_properties,
+};
+
 static struct i2c_board_info i2c_info[] = {
 	{
 		I2C_BOARD_INFO("24c256", 0x50),
-		.properties = eeprom_properties,
+		.swnode = &eeprom_node,
 	},
 	{
 		I2C_BOARD_INFO("tlv320aic3x", 0x18),
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index 7755cccec550c..cce3a621eb20b 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -541,6 +541,10 @@ static const struct property_entry eeprom_properties[] = {
 	{ }
 };
 
+static const struct software_node eeprom_node = {
+	.properties = eeprom_properties,
+};
+
 /*
  * MSP430 supports RTC, card detection, input from IR remote, and
  * a bit more.  It triggers interrupts on GPIO(7) from pressing
@@ -647,7 +651,7 @@ static struct i2c_board_info __initdata i2c_info[] =  {
 	},
 	{
 		I2C_BOARD_INFO("24c256", 0x50),
-		.properties = eeprom_properties,
+		.swnode = &eeprom_node,
 	},
 	{
 		I2C_BOARD_INFO("tlv320aic33", 0x1b),
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index 952ddabc743e0..ee91d81ebbfdf 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -362,6 +362,10 @@ static const struct property_entry eeprom_properties[] = {
 	PROPERTY_ENTRY_U32("pagesize", 64),
 	{ }
 };
+
+static const struct software_node eeprom_node = {
+	.properties = eeprom_properties,
+};
 #endif
 
 static u8 dm646x_iis_serializer_direction[] = {
@@ -430,7 +434,7 @@ static void evm_init_cpld(void)
 static struct i2c_board_info __initdata i2c_info[] =  {
 	{
 		I2C_BOARD_INFO("24c256", 0x50),
-		.properties  = eeprom_properties,
+		.swnode = &eeprom_node,
 	},
 	{
 		I2C_BOARD_INFO("pcf8574a", 0x38),
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
index 5205008c8061b..2127969beb965 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -197,6 +197,10 @@ static const struct property_entry mityomapl138_fd_chip_properties[] = {
 	{ }
 };
 
+static const struct software_node mityomapl138_fd_chip_node = {
+	.properties = mityomapl138_fd_chip_properties,
+};
+
 static struct davinci_i2c_platform_data mityomap_i2c_0_pdata = {
 	.bus_freq	= 100,	/* kHz */
 	.bus_delay	= 0,	/* usec */
@@ -323,7 +327,7 @@ static struct i2c_board_info __initdata mityomap_tps65023_info[] = {
 	},
 	{
 		I2C_BOARD_INFO("24c02", 0x50),
-		.properties = mityomapl138_fd_chip_properties,
+		.swnode = &mityomapl138_fd_chip_node,
 	},
 };
 
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c
index 79b47958e9926..6930b2f485d19 100644
--- a/arch/arm/mach-davinci/board-sffsdr.c
+++ b/arch/arm/mach-davinci/board-sffsdr.c
@@ -84,10 +84,14 @@ static const struct property_entry eeprom_properties[] = {
 	{ }
 };
 
+static const struct software_node eeprom_node = {
+	.properties = eeprom_properties,
+};
+
 static struct i2c_board_info __initdata i2c_info[] =  {
 	{
 		I2C_BOARD_INFO("24c64", 0x50),
-		.properties = eeprom_properties,
+		.swnode = &eeprom_node,
 	},
 	/* Other I2C devices:
 	 * MSP430,  addr 0x23 (not used)
-- 
2.30.2


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

* [PATCH 03/12] ARM: omap1: osk: Constify the software node
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
  2021-03-29 10:50 ` [PATCH 01/12] i2c: Add " Heikki Krogerus
  2021-03-29 10:50 ` [PATCH 02/12] ARM: davinci: Constify the " Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-03-31  6:15   ` Tony Lindgren
  2021-03-29 10:50 ` [PATCH 04/12] ARM: pxa: stargate2: " Heikki Krogerus
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Aaro Koskinen, Tony Lindgren

Additional device properties are always just a part of a
software fwnode. If the device properties are constant, the
software node can also be constant.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap1/board-osk.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 0a4c9b0b13b0c..e18b6f13300eb 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -332,11 +332,15 @@ static const struct property_entry mistral_at24_properties[] = {
 	{ }
 };
 
+static const struct software_node mistral_at24_node = {
+	.properties = mistral_at24_properties,
+};
+
 static struct i2c_board_info __initdata mistral_i2c_board_info[] = {
 	{
 		/* NOTE:  powered from LCD supply */
 		I2C_BOARD_INFO("24c04", 0x50),
-		.properties = mistral_at24_properties,
+		.swnode = &mistral_at24_node,
 	},
 	/* TODO when driver support is ready:
 	 *  - optionally ov9640 camera sensor at 0x30
-- 
2.30.2


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

* [PATCH 04/12] ARM: pxa: stargate2: Constify the software node
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (2 preceding siblings ...)
  2021-03-29 10:50 ` [PATCH 03/12] ARM: omap1: osk: Constify the software node Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-04-06 19:39   ` Wolfram Sang
  2021-03-29 10:50 ` [PATCH 05/12] ARM: s3c: mini2440: " Heikki Krogerus
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Jonathan Cameron, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik

Additional device properties are always just a part of a
software fwnode. If the device properties are constant, the
software node can also be constant.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
---
 arch/arm/mach-pxa/stargate2.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index e2353f7dcf01a..7ad6274657686 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -794,6 +794,10 @@ static const struct property_entry pca9500_eeprom_properties[] = {
 	{ }
 };
 
+static const struct software_node pca9500_eeprom_node = {
+	.properties = pca9500_eeprom_properties,
+};
+
 /**
  * stargate2_reset_bluetooth() reset the bluecore to ensure consistent state
  **/
@@ -929,7 +933,7 @@ static struct i2c_board_info __initdata stargate2_i2c_board_info[] = {
 	}, {
 		.type = "24c02",
 		.addr = 0x57,
-		.properties = pca9500_eeprom_properties,
+		.swnode = &pca9500_eeprom_node,
 	}, {
 		.type = "max1238",
 		.addr = 0x35,
-- 
2.30.2


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

* [PATCH 05/12] ARM: s3c: mini2440: Constify the software node
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (3 preceding siblings ...)
  2021-03-29 10:50 ` [PATCH 04/12] ARM: pxa: stargate2: " Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-03-29 10:58   ` Krzysztof Kozlowski
  2021-03-29 10:50 ` [PATCH 06/12] platform/x86: intel_cht_int33fe_microb: " Heikki Krogerus
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Krzysztof Kozlowski

Additional device properties are always just a part of a
software fwnode. If the device properties are constant, the
software node can also be constant.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm/mach-s3c/mach-mini2440.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-s3c/mach-mini2440.c b/arch/arm/mach-s3c/mach-mini2440.c
index 4100905dfbd0c..551ec660ab599 100644
--- a/arch/arm/mach-s3c/mach-mini2440.c
+++ b/arch/arm/mach-s3c/mach-mini2440.c
@@ -542,10 +542,14 @@ static const struct property_entry mini2440_at24_properties[] = {
 	{ }
 };
 
+static const struct software_node mini2440_at24_node = {
+	.properties = mini2440_at24_properties,
+};
+
 static struct i2c_board_info mini2440_i2c_devs[] __initdata = {
 	{
 		I2C_BOARD_INFO("24c08", 0x50),
-		.properties = mini2440_at24_properties,
+		.swnode = &mini2440_at24_node,
 	},
 };
 
-- 
2.30.2


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

* [PATCH 06/12] platform/x86: intel_cht_int33fe_microb: Constify the software node
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (4 preceding siblings ...)
  2021-03-29 10:50 ` [PATCH 05/12] ARM: s3c: mini2440: " Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-03-29 15:27   ` Hans de Goede
  2021-03-29 10:50 ` [PATCH 07/12] i2c: cht-wc: " Heikki Krogerus
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Hans de Goede

Additional device properties are always just a part of a
software fwnode. If the device properties are constant, the
software node can also be constant.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>
---
 drivers/platform/x86/intel_cht_int33fe_microb.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel_cht_int33fe_microb.c b/drivers/platform/x86/intel_cht_int33fe_microb.c
index 20b11e0d9a758..673f41cd14b52 100644
--- a/drivers/platform/x86/intel_cht_int33fe_microb.c
+++ b/drivers/platform/x86/intel_cht_int33fe_microb.c
@@ -35,6 +35,10 @@ static const struct property_entry bq27xxx_props[] = {
 	{ }
 };
 
+static const struct software_node bq27xxx_node = {
+	.properties = bq27xxx_props,
+};
+
 int cht_int33fe_microb_probe(struct cht_int33fe_data *data)
 {
 	struct device *dev = data->dev;
@@ -43,7 +47,7 @@ int cht_int33fe_microb_probe(struct cht_int33fe_data *data)
 	memset(&board_info, 0, sizeof(board_info));
 	strscpy(board_info.type, "bq27542", ARRAY_SIZE(board_info.type));
 	board_info.dev_name = "bq27542";
-	board_info.properties = bq27xxx_props;
+	board_info.swnode = &bq27xxx_node;
 	data->battery_fg = i2c_acpi_new_device(dev, 1, &board_info);
 
 	return PTR_ERR_OR_ZERO(data->battery_fg);
-- 
2.30.2


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

* [PATCH 07/12] i2c: cht-wc: Constify the software node
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (5 preceding siblings ...)
  2021-03-29 10:50 ` [PATCH 06/12] platform/x86: intel_cht_int33fe_microb: " Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-03-29 15:28   ` Hans de Goede
  2021-03-29 10:50 ` [PATCH 08/12] i2c: nvidia-gpu: " Heikki Krogerus
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Hans de Goede

Additional device properties are always just a part of a
software fwnode. If the device properties are constant, the
software node can also be constant.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>
---
 drivers/i2c/busses/i2c-cht-wc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
index f80d79e973cd2..08f491ea21ac9 100644
--- a/drivers/i2c/busses/i2c-cht-wc.c
+++ b/drivers/i2c/busses/i2c-cht-wc.c
@@ -280,6 +280,10 @@ static const struct property_entry bq24190_props[] = {
 	{ }
 };
 
+static const struct software_node bq24190_node = {
+	.properties = bq24190_props,
+};
+
 static struct regulator_consumer_supply fusb302_consumer = {
 	.supply = "vbus",
 	/* Must match fusb302 dev_name in intel_cht_int33fe.c */
@@ -308,7 +312,7 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev)
 		.type = "bq24190",
 		.addr = 0x6b,
 		.dev_name = "bq24190",
-		.properties = bq24190_props,
+		.swnode = &bq24190_node,
 		.platform_data = &bq24190_pdata,
 	};
 	int ret, reg, irq;
-- 
2.30.2


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

* [PATCH 08/12] i2c: nvidia-gpu: Constify the software node
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (6 preceding siblings ...)
  2021-03-29 10:50 ` [PATCH 07/12] i2c: cht-wc: " Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-03-29 10:50 ` [PATCH 09/12] i2c: icy: " Heikki Krogerus
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Ajay Gupta

Additional device properties are always just a part of a
software fwnode. If the device properties are constant, the
software node can also be constant.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Ajay Gupta <ajayg@nvidia.com>
---
 drivers/i2c/busses/i2c-nvidia-gpu.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index 6b20601ffb139..b5055a3cbd935 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -262,6 +262,10 @@ static const struct property_entry ccgx_props[] = {
 	{ }
 };
 
+static const struct software_node ccgx_node = {
+	.properties = ccgx_props,
+};
+
 static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq)
 {
 	i2cd->gpu_ccgx_ucsi = devm_kzalloc(i2cd->dev,
@@ -274,7 +278,7 @@ static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq)
 		sizeof(i2cd->gpu_ccgx_ucsi->type));
 	i2cd->gpu_ccgx_ucsi->addr = 0x8;
 	i2cd->gpu_ccgx_ucsi->irq = irq;
-	i2cd->gpu_ccgx_ucsi->properties = ccgx_props;
+	i2cd->gpu_ccgx_ucsi->swnode = &ccgx_node;
 	i2cd->ccgx_client = i2c_new_client_device(&i2cd->adapter, i2cd->gpu_ccgx_ucsi);
 	return PTR_ERR_OR_ZERO(i2cd->ccgx_client);
 }
-- 
2.30.2


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

* [PATCH 09/12] i2c: icy: Constify the software node
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (7 preceding siblings ...)
  2021-03-29 10:50 ` [PATCH 08/12] i2c: nvidia-gpu: " Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-03-30 13:58   ` Max Staudt
  2021-03-29 10:50 ` [PATCH 10/12] platform/chrome: chromeos_laptop - Prepare complete software nodes Heikki Krogerus
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Max Staudt

Complete software node can now be supplied to the device
with struct i2c_board_info.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Max Staudt <max@enpas.org>
---
 drivers/i2c/busses/i2c-icy.c | 32 +++++++++-----------------------
 1 file changed, 9 insertions(+), 23 deletions(-)

diff --git a/drivers/i2c/busses/i2c-icy.c b/drivers/i2c/busses/i2c-icy.c
index 66c9923fc7665..c8c422e9dda43 100644
--- a/drivers/i2c/busses/i2c-icy.c
+++ b/drivers/i2c/busses/i2c-icy.c
@@ -54,7 +54,6 @@ struct icy_i2c {
 
 	void __iomem *reg_s0;
 	void __iomem *reg_s1;
-	struct fwnode_handle *ltc2990_fwnode;
 	struct i2c_client *ltc2990_client;
 };
 
@@ -115,6 +114,10 @@ static const struct property_entry icy_ltc2990_props[] = {
 	{ }
 };
 
+static const struct software_node icy_ltc2990_node = {
+	.properties = icy_ltc2990_props,
+};
+
 static int icy_probe(struct zorro_dev *z,
 		     const struct zorro_device_id *ent)
 {
@@ -123,6 +126,7 @@ static int icy_probe(struct zorro_dev *z,
 	struct fwnode_handle *new_fwnode;
 	struct i2c_board_info ltc2990_info = {
 		.type		= "ltc2990",
+		.swnode		= &icy_ltc2990_node,
 	};
 
 	i2c = devm_kzalloc(&z->dev, sizeof(*i2c), GFP_KERNEL);
@@ -174,26 +178,10 @@ static int icy_probe(struct zorro_dev *z,
 	 *
 	 * See property_entry above for in1, in2, temp3.
 	 */
-	new_fwnode = fwnode_create_software_node(icy_ltc2990_props, NULL);
-	if (IS_ERR(new_fwnode)) {
-		dev_info(&z->dev, "Failed to create fwnode for LTC2990, error: %ld\n",
-			 PTR_ERR(new_fwnode));
-	} else {
-		/*
-		 * Store the fwnode so we can destroy it on .remove().
-		 * Only store it on success, as fwnode_remove_software_node()
-		 * is NULL safe, but not PTR_ERR safe.
-		 */
-		i2c->ltc2990_fwnode = new_fwnode;
-		ltc2990_info.fwnode = new_fwnode;
-
-		i2c->ltc2990_client =
-			i2c_new_scanned_device(&i2c->adapter,
-					       &ltc2990_info,
-					       icy_ltc2990_addresses,
-					       NULL);
-	}
-
+	i2c->ltc2990_client = i2c_new_scanned_device(&i2c->adapter,
+						     &ltc2990_info,
+						     icy_ltc2990_addresses,
+						     NULL);
 	return 0;
 }
 
@@ -202,8 +190,6 @@ static void icy_remove(struct zorro_dev *z)
 	struct icy_i2c *i2c = dev_get_drvdata(&z->dev);
 
 	i2c_unregister_device(i2c->ltc2990_client);
-	fwnode_remove_software_node(i2c->ltc2990_fwnode);
-
 	i2c_del_adapter(&i2c->adapter);
 }
 
-- 
2.30.2


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

* [PATCH 10/12] platform/chrome: chromeos_laptop - Prepare complete software nodes
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (8 preceding siblings ...)
  2021-03-29 10:50 ` [PATCH 09/12] i2c: icy: " Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-03-30 16:33   ` Enric Balletbo i Serra
  2021-03-29 10:50 ` [PATCH 11/12] Input: elantech - Prepare a complete software node for the device Heikki Krogerus
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Benson Leung, Enric Balletbo i Serra

The older device property API is going to be removed soon
and that will affect also I2C subystem. Supplying complete
software nodes instead of only the properties in them for
the I2C devices.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Benson Leung <bleung@chromium.org>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
 drivers/platform/chrome/chromeos_laptop.c | 100 +++++++++++++---------
 1 file changed, 60 insertions(+), 40 deletions(-)

diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
index 472a03daa8693..4e14b4d6635d7 100644
--- a/drivers/platform/chrome/chromeos_laptop.c
+++ b/drivers/platform/chrome/chromeos_laptop.c
@@ -52,12 +52,15 @@ struct i2c_peripheral {
 	enum i2c_adapter_type type;
 	u32 pci_devid;
 
+	const struct property_entry *properties;
+
 	struct i2c_client *client;
 };
 
 struct acpi_peripheral {
 	char hid[ACPI_ID_LEN];
-	const struct property_entry *properties;
+	struct software_node swnode;
+	struct i2c_client *client;
 };
 
 struct chromeos_laptop {
@@ -68,7 +71,7 @@ struct chromeos_laptop {
 	struct i2c_peripheral *i2c_peripherals;
 	unsigned int num_i2c_peripherals;
 
-	const struct acpi_peripheral *acpi_peripherals;
+	struct acpi_peripheral *acpi_peripherals;
 	unsigned int num_acpi_peripherals;
 };
 
@@ -161,7 +164,7 @@ static void chromeos_laptop_check_adapter(struct i2c_adapter *adapter)
 
 static bool chromeos_laptop_adjust_client(struct i2c_client *client)
 {
-	const struct acpi_peripheral *acpi_dev;
+	struct acpi_peripheral *acpi_dev;
 	struct acpi_device_id acpi_ids[2] = { };
 	int i;
 	int error;
@@ -175,8 +178,7 @@ static bool chromeos_laptop_adjust_client(struct i2c_client *client)
 		memcpy(acpi_ids[0].id, acpi_dev->hid, ACPI_ID_LEN);
 
 		if (acpi_match_device(acpi_ids, &client->dev)) {
-			error = device_add_properties(&client->dev,
-						      acpi_dev->properties);
+			error = device_add_software_node(&client->dev, &acpi_dev->swnode);
 			if (error) {
 				dev_err(&client->dev,
 					"failed to add properties: %d\n",
@@ -184,6 +186,8 @@ static bool chromeos_laptop_adjust_client(struct i2c_client *client)
 				break;
 			}
 
+			acpi_dev->client = client;
+
 			return true;
 		}
 	}
@@ -193,15 +197,28 @@ static bool chromeos_laptop_adjust_client(struct i2c_client *client)
 
 static void chromeos_laptop_detach_i2c_client(struct i2c_client *client)
 {
+	struct acpi_peripheral *acpi_dev;
 	struct i2c_peripheral *i2c_dev;
 	int i;
 
-	for (i = 0; i < cros_laptop->num_i2c_peripherals; i++) {
-		i2c_dev = &cros_laptop->i2c_peripherals[i];
+	if (has_acpi_companion(&client->dev))
+		for (i = 0; i < cros_laptop->num_acpi_peripherals; i++) {
+			acpi_dev = &cros_laptop->acpi_peripherals[i];
 
-		if (i2c_dev->client == client)
-			i2c_dev->client = NULL;
-	}
+			if (acpi_dev->client == client) {
+				acpi_dev->client = NULL;
+				return;
+			}
+		}
+	else
+		for (i = 0; i < cros_laptop->num_i2c_peripherals; i++) {
+			i2c_dev = &cros_laptop->i2c_peripherals[i];
+
+			if (i2c_dev->client == client) {
+				i2c_dev->client = NULL;
+				return;
+			}
+		}
 }
 
 static int chromeos_laptop_i2c_notifier_call(struct notifier_block *nb,
@@ -302,28 +319,26 @@ static struct i2c_peripheral chromebook_pixel_peripherals[] __initdata = {
 		.board_info	= {
 			I2C_BOARD_INFO("atmel_mxt_ts",
 					ATMEL_TS_I2C_ADDR),
-			.properties	=
-				chromebook_atmel_touchscreen_props,
 			.flags		= I2C_CLIENT_WAKE,
 		},
 		.dmi_name	= "touchscreen",
 		.irqflags	= IRQF_TRIGGER_FALLING,
 		.type		= I2C_ADAPTER_PANEL,
 		.alt_addr	= ATMEL_TS_I2C_BL_ADDR,
+		.properties	= chromebook_atmel_touchscreen_props,
 	},
 	/* Touchpad. */
 	{
 		.board_info	= {
 			I2C_BOARD_INFO("atmel_mxt_tp",
 					ATMEL_TP_I2C_ADDR),
-			.properties	=
-				chromebook_pixel_trackpad_props,
 			.flags		= I2C_CLIENT_WAKE,
 		},
 		.dmi_name	= "trackpad",
 		.irqflags	= IRQF_TRIGGER_FALLING,
 		.type		= I2C_ADAPTER_VGADDC,
 		.alt_addr	= ATMEL_TP_I2C_BL_ADDR,
+		.properties	= chromebook_pixel_trackpad_props,
 	},
 	/* Light Sensor. */
 	{
@@ -414,8 +429,6 @@ static struct i2c_peripheral acer_c720_peripherals[] __initdata = {
 		.board_info	= {
 			I2C_BOARD_INFO("atmel_mxt_ts",
 					ATMEL_TS_I2C_ADDR),
-			.properties	=
-				chromebook_atmel_touchscreen_props,
 			.flags		= I2C_CLIENT_WAKE,
 		},
 		.dmi_name	= "touchscreen",
@@ -423,6 +436,7 @@ static struct i2c_peripheral acer_c720_peripherals[] __initdata = {
 		.type		= I2C_ADAPTER_DESIGNWARE,
 		.pci_devid	= PCI_DEVID(0, PCI_DEVFN(0x15, 0x2)),
 		.alt_addr	= ATMEL_TS_I2C_BL_ADDR,
+		.properties	= chromebook_atmel_touchscreen_props,
 	},
 	/* Touchpad. */
 	{
@@ -498,12 +512,16 @@ static struct acpi_peripheral samus_peripherals[] __initdata = {
 	/* Touchpad */
 	{
 		.hid		= "ATML0000",
-		.properties	= samus_trackpad_props,
+		.swnode		= {
+			.properties = samus_trackpad_props,
+		},
 	},
 	/* Touchsceen */
 	{
 		.hid		= "ATML0001",
-		.properties	= chromebook_atmel_touchscreen_props,
+		.swnode		= {
+			.properties = chromebook_atmel_touchscreen_props,
+		},
 	},
 };
 DECLARE_ACPI_CROS_LAPTOP(samus);
@@ -512,12 +530,16 @@ static struct acpi_peripheral generic_atmel_peripherals[] __initdata = {
 	/* Touchpad */
 	{
 		.hid		= "ATML0000",
-		.properties	= chromebook_pixel_trackpad_props,
+		.swnode		= {
+			.properties = chromebook_pixel_trackpad_props,
+		},
 	},
 	/* Touchsceen */
 	{
 		.hid		= "ATML0001",
-		.properties	= chromebook_atmel_touchscreen_props,
+		.swnode		= {
+			.properties = chromebook_atmel_touchscreen_props,
+		},
 	},
 };
 DECLARE_ACPI_CROS_LAPTOP(generic_atmel);
@@ -743,12 +765,11 @@ chromeos_laptop_prepare_i2c_peripherals(struct chromeos_laptop *cros_laptop,
 		if (error)
 			goto err_out;
 
-		/* We need to deep-copy properties */
-		if (info->properties) {
-			info->properties =
-				property_entries_dup(info->properties);
-			if (IS_ERR(info->properties)) {
-				error = PTR_ERR(info->properties);
+		/* Create primary fwnode for the device - copies everything */
+		if (i2c_dev->properties) {
+			info->fwnode = fwnode_create_software_node(i2c_dev->properties, NULL);
+			if (IS_ERR(info->fwnode)) {
+				error = PTR_ERR(info->fwnode);
 				goto err_out;
 			}
 		}
@@ -760,8 +781,8 @@ chromeos_laptop_prepare_i2c_peripherals(struct chromeos_laptop *cros_laptop,
 	while (--i >= 0) {
 		i2c_dev = &cros_laptop->i2c_peripherals[i];
 		info = &i2c_dev->board_info;
-		if (info->properties)
-			property_entries_free(info->properties);
+		if (!IS_ERR_OR_NULL(info->fwnode))
+			fwnode_remove_software_node(info->fwnode);
 	}
 	kfree(cros_laptop->i2c_peripherals);
 	return error;
@@ -801,11 +822,11 @@ chromeos_laptop_prepare_acpi_peripherals(struct chromeos_laptop *cros_laptop,
 		*acpi_dev = *src_dev;
 
 		/* We need to deep-copy properties */
-		if (src_dev->properties) {
-			acpi_dev->properties =
-				property_entries_dup(src_dev->properties);
-			if (IS_ERR(acpi_dev->properties)) {
-				error = PTR_ERR(acpi_dev->properties);
+		if (src_dev->swnode.properties) {
+			acpi_dev->swnode.properties =
+				property_entries_dup(src_dev->swnode.properties);
+			if (IS_ERR(acpi_dev->swnode.properties)) {
+				error = PTR_ERR(acpi_dev->swnode.properties);
 				goto err_out;
 			}
 		}
@@ -821,8 +842,8 @@ chromeos_laptop_prepare_acpi_peripherals(struct chromeos_laptop *cros_laptop,
 err_out:
 	while (--i >= 0) {
 		acpi_dev = &acpi_peripherals[i];
-		if (acpi_dev->properties)
-			property_entries_free(acpi_dev->properties);
+		if (!IS_ERR_OR_NULL(acpi_dev->swnode.properties))
+			property_entries_free(acpi_dev->swnode.properties);
 	}
 
 	kfree(acpi_peripherals);
@@ -833,21 +854,20 @@ static void chromeos_laptop_destroy(const struct chromeos_laptop *cros_laptop)
 {
 	const struct acpi_peripheral *acpi_dev;
 	struct i2c_peripheral *i2c_dev;
-	struct i2c_board_info *info;
 	int i;
 
 	for (i = 0; i < cros_laptop->num_i2c_peripherals; i++) {
 		i2c_dev = &cros_laptop->i2c_peripherals[i];
-		info = &i2c_dev->board_info;
-
 		i2c_unregister_device(i2c_dev->client);
-		property_entries_free(info->properties);
 	}
 
 	for (i = 0; i < cros_laptop->num_acpi_peripherals; i++) {
 		acpi_dev = &cros_laptop->acpi_peripherals[i];
 
-		property_entries_free(acpi_dev->properties);
+		if (acpi_dev->client)
+			device_remove_software_node(&acpi_dev->client->dev);
+
+		property_entries_free(acpi_dev->swnode.properties);
 	}
 
 	kfree(cros_laptop->i2c_peripherals);
-- 
2.30.2


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

* [PATCH 11/12] Input: elantech - Prepare a complete software node for the device
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (9 preceding siblings ...)
  2021-03-29 10:50 ` [PATCH 10/12] platform/chrome: chromeos_laptop - Prepare complete software nodes Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-03-29 19:05   ` Dmitry Torokhov
  2021-03-29 10:50 ` [PATCH 12/12] i2c: Remove support for dangling device properties Heikki Krogerus
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Dmitry Torokhov

Creating a software node and supplying that for the device
instead of only the device properties in it. A software
node was always created in any case to hold the additional
device properties, so this change does not have any real
effect.

This change makes it possible to remove support for the
problematic "dangling" device properties from i2c subsystem,
i.e. the "properties" member from struct i2c_board_info. The
problems caused by them are not related to this driver.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/mouse/elantech.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 97381e2e03bae..2d0bc029619ff 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1885,8 +1885,6 @@ static int elantech_create_smbus(struct psmouse *psmouse,
 	};
 	unsigned int idx = 0;
 
-	smbus_board.properties = i2c_props;
-
 	i2c_props[idx++] = PROPERTY_ENTRY_U32("touchscreen-size-x",
 						   info->x_max + 1);
 	i2c_props[idx++] = PROPERTY_ENTRY_U32("touchscreen-size-y",
@@ -1918,6 +1916,10 @@ static int elantech_create_smbus(struct psmouse *psmouse,
 	if (elantech_is_buttonpad(info))
 		i2c_props[idx++] = PROPERTY_ENTRY_BOOL("elan,clickpad");
 
+	smbus_board.fwnode = fwnode_create_software_node(i2c_props, NULL);
+	if (IS_ERR(smbus_board.fwnode))
+		return PTR_ERR(smbus_board.fwnode);
+
 	return psmouse_smbus_init(psmouse, &smbus_board, NULL, 0, false,
 				  leave_breadcrumbs);
 }
-- 
2.30.2


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

* [PATCH 12/12] i2c: Remove support for dangling device properties
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (10 preceding siblings ...)
  2021-03-29 10:50 ` [PATCH 11/12] Input: elantech - Prepare a complete software node for the device Heikki Krogerus
@ 2021-03-29 10:50 ` Heikki Krogerus
  2021-03-31  9:22 ` [PATCH 00/12] i2c: Adding support for software nodes Wolfram Sang
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 10:50 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel

From now on only accepting complete software nodes.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/i2c/i2c-boardinfo.c | 11 -----------
 drivers/i2c/i2c-core-base.c | 15 +--------------
 include/linux/i2c.h         |  2 --
 3 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/drivers/i2c/i2c-boardinfo.c b/drivers/i2c/i2c-boardinfo.c
index 8bc51d4e69df3..4df8ad092df38 100644
--- a/drivers/i2c/i2c-boardinfo.c
+++ b/drivers/i2c/i2c-boardinfo.c
@@ -47,7 +47,6 @@ EXPORT_SYMBOL_GPL(__i2c_first_dynamic_bus_num);
  *
  * The board info passed can safely be __initdata, but be careful of embedded
  * pointers (for platform_data, functions, etc) since that won't be copied.
- * Device properties are deep-copied though.
  */
 int i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsigned len)
 {
@@ -72,16 +71,6 @@ int i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsig
 		devinfo->busnum = busnum;
 		devinfo->board_info = *info;
 
-		if (info->properties) {
-			devinfo->board_info.properties =
-					property_entries_dup(info->properties);
-			if (IS_ERR(devinfo->board_info.properties)) {
-				status = PTR_ERR(devinfo->board_info.properties);
-				kfree(devinfo);
-				break;
-			}
-		}
-
 		if (info->resources) {
 			devinfo->board_info.resources =
 				kmemdup(info->resources,
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index a6a68081f54e1..916899ee1115f 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -910,23 +910,13 @@ i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf
 
 	i2c_dev_set_name(adap, client, info);
 
-	if (info->properties) {
-		status = device_add_properties(&client->dev, info->properties);
-		if (status) {
-			dev_err(&adap->dev,
-				"Failed to add properties to client %s: %d\n",
-				client->name, status);
-			goto out_err_put_of_node;
-		}
-	}
-
 	if (info->swnode) {
 		status = device_add_software_node(&client->dev, info->swnode);
 		if (status) {
 			dev_err(&adap->dev,
 				"Failed to add software node to client %s: %d\n",
 				client->name, status);
-			goto out_free_props;
+			goto out_err_put_of_node;
 		}
 	}
 
@@ -941,9 +931,6 @@ i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf
 
 out_remove_swnode:
 	device_remove_software_node(&client->dev);
-out_free_props:
-	if (info->properties)
-		device_remove_properties(&client->dev);
 out_err_put_of_node:
 	of_node_put(info->of_node);
 out_err:
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index cb1f882a3e88e..54b3ccc71e372 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -391,7 +391,6 @@ static inline bool i2c_detect_slave_mode(struct device *dev) { return false; }
  * @platform_data: stored in i2c_client.dev.platform_data
  * @of_node: pointer to OpenFirmware device node
  * @fwnode: device node supplied by the platform firmware
- * @properties: Deprecated - use swnode instead
  * @swnode: software node for the device
  * @resources: resources associated with the device
  * @num_resources: number of resources in the @resources array
@@ -416,7 +415,6 @@ struct i2c_board_info {
 	void		*platform_data;
 	struct device_node *of_node;
 	struct fwnode_handle *fwnode;
-	const struct property_entry *properties;
 	const struct software_node *swnode;
 	const struct resource *resources;
 	unsigned int	num_resources;
-- 
2.30.2


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

* Re: [PATCH 05/12] ARM: s3c: mini2440: Constify the software node
  2021-03-29 10:50 ` [PATCH 05/12] ARM: s3c: mini2440: " Heikki Krogerus
@ 2021-03-29 10:58   ` Krzysztof Kozlowski
  2021-03-29 12:32     ` Heikki Krogerus
  0 siblings, 1 reply; 38+ messages in thread
From: Krzysztof Kozlowski @ 2021-03-29 10:58 UTC (permalink / raw)
  To: Heikki Krogerus, Wolfram Sang; +Cc: linux-i2c, linux-kernel

On 29/03/2021 12:50, Heikki Krogerus wrote:
> Additional device properties are always just a part of a
> software fwnode. If the device properties are constant, the
> software node can also be constant.
> 
Hi,

Thanks for your work.

I did not get the cover letter nor other patches from this set and I
don't see how the i2c uses the swnode. This makes difficult to judge
whether this looks reasonable. At least without the context the title
looks misleading - you add software_node or change to use software_node
instead of constifying it.


Best regards,
Krzysztof

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

* Re: [PATCH 05/12] ARM: s3c: mini2440: Constify the software node
  2021-03-29 10:58   ` Krzysztof Kozlowski
@ 2021-03-29 12:32     ` Heikki Krogerus
  2021-04-01 17:44       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-29 12:32 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Wolfram Sang, linux-i2c, linux-kernel

On Mon, Mar 29, 2021 at 12:58:41PM +0200, Krzysztof Kozlowski wrote:
> On 29/03/2021 12:50, Heikki Krogerus wrote:
> > Additional device properties are always just a part of a
> > software fwnode. If the device properties are constant, the
> > software node can also be constant.
> > 
> Hi,
> 
> Thanks for your work.
> 
> I did not get the cover letter nor other patches from this set and I
> don't see how the i2c uses the swnode. This makes difficult to judge
> whether this looks reasonable. At least without the context the title
> looks misleading - you add software_node or change to use software_node
> instead of constifying it.

OK, I'll try to open this up somehow...

Whenever additional device properties are added to devices by using
the old device property API (device_add_properties()) that also i2c
core code uses, in reality a software node is always created to hold
those properties. It's just always dynamically allocated.

The goal of this series is to prepare the i2c subsystem and drivers
for the removal of that old device property API, but I did not see
that as relevant info for this patch, because even if we did not in
the end remove that old API, this change is still useful.

The patch does exactly what the subject says. After this we supply the
device a constant software node instead of a dynamically allocated one.


thanks,

-- 
heikki

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

* Re: [PATCH 06/12] platform/x86: intel_cht_int33fe_microb: Constify the software node
  2021-03-29 10:50 ` [PATCH 06/12] platform/x86: intel_cht_int33fe_microb: " Heikki Krogerus
@ 2021-03-29 15:27   ` Hans de Goede
  2021-04-06 19:40     ` Wolfram Sang
  0 siblings, 1 reply; 38+ messages in thread
From: Hans de Goede @ 2021-03-29 15:27 UTC (permalink / raw)
  To: Heikki Krogerus, Wolfram Sang; +Cc: linux-i2c, linux-kernel

Hi,

On 3/29/21 12:50 PM, Heikki Krogerus wrote:
> Additional device properties are always just a part of a
> software fwnode. If the device properties are constant, the
> software node can also be constant.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Hans de Goede <hdegoede@redhat.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

What is the plan for merging this patch / this series ?

Regards,

Hans


> ---
>  drivers/platform/x86/intel_cht_int33fe_microb.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/intel_cht_int33fe_microb.c b/drivers/platform/x86/intel_cht_int33fe_microb.c
> index 20b11e0d9a758..673f41cd14b52 100644
> --- a/drivers/platform/x86/intel_cht_int33fe_microb.c
> +++ b/drivers/platform/x86/intel_cht_int33fe_microb.c
> @@ -35,6 +35,10 @@ static const struct property_entry bq27xxx_props[] = {
>  	{ }
>  };
>  
> +static const struct software_node bq27xxx_node = {
> +	.properties = bq27xxx_props,
> +};
> +
>  int cht_int33fe_microb_probe(struct cht_int33fe_data *data)
>  {
>  	struct device *dev = data->dev;
> @@ -43,7 +47,7 @@ int cht_int33fe_microb_probe(struct cht_int33fe_data *data)
>  	memset(&board_info, 0, sizeof(board_info));
>  	strscpy(board_info.type, "bq27542", ARRAY_SIZE(board_info.type));
>  	board_info.dev_name = "bq27542";
> -	board_info.properties = bq27xxx_props;
> +	board_info.swnode = &bq27xxx_node;
>  	data->battery_fg = i2c_acpi_new_device(dev, 1, &board_info);
>  
>  	return PTR_ERR_OR_ZERO(data->battery_fg);
> 


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

* Re: [PATCH 07/12] i2c: cht-wc: Constify the software node
  2021-03-29 10:50 ` [PATCH 07/12] i2c: cht-wc: " Heikki Krogerus
@ 2021-03-29 15:28   ` Hans de Goede
  0 siblings, 0 replies; 38+ messages in thread
From: Hans de Goede @ 2021-03-29 15:28 UTC (permalink / raw)
  To: Heikki Krogerus, Wolfram Sang; +Cc: linux-i2c, linux-kernel

Hi,

On 3/29/21 12:50 PM, Heikki Krogerus wrote:
> Additional device properties are always just a part of a
> software fwnode. If the device properties are constant, the
> software node can also be constant.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Hans de Goede <hdegoede@redhat.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> ---
>  drivers/i2c/busses/i2c-cht-wc.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
> index f80d79e973cd2..08f491ea21ac9 100644
> --- a/drivers/i2c/busses/i2c-cht-wc.c
> +++ b/drivers/i2c/busses/i2c-cht-wc.c
> @@ -280,6 +280,10 @@ static const struct property_entry bq24190_props[] = {
>  	{ }
>  };
>  
> +static const struct software_node bq24190_node = {
> +	.properties = bq24190_props,
> +};
> +
>  static struct regulator_consumer_supply fusb302_consumer = {
>  	.supply = "vbus",
>  	/* Must match fusb302 dev_name in intel_cht_int33fe.c */
> @@ -308,7 +312,7 @@ static int cht_wc_i2c_adap_i2c_probe(struct platform_device *pdev)
>  		.type = "bq24190",
>  		.addr = 0x6b,
>  		.dev_name = "bq24190",
> -		.properties = bq24190_props,
> +		.swnode = &bq24190_node,
>  		.platform_data = &bq24190_pdata,
>  	};
>  	int ret, reg, irq;
> 


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

* Re: [PATCH 11/12] Input: elantech - Prepare a complete software node for the device
  2021-03-29 10:50 ` [PATCH 11/12] Input: elantech - Prepare a complete software node for the device Heikki Krogerus
@ 2021-03-29 19:05   ` Dmitry Torokhov
  0 siblings, 0 replies; 38+ messages in thread
From: Dmitry Torokhov @ 2021-03-29 19:05 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: Wolfram Sang, linux-i2c, linux-kernel

On Mon, Mar 29, 2021 at 01:50:46PM +0300, Heikki Krogerus wrote:
> Creating a software node and supplying that for the device
> instead of only the device properties in it. A software
> node was always created in any case to hold the additional
> device properties, so this change does not have any real
> effect.
> 
> This change makes it possible to remove support for the
> problematic "dangling" device properties from i2c subsystem,
> i.e. the "properties" member from struct i2c_board_info. The
> problems caused by them are not related to this driver.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Thanks.

-- 
Dmitry

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

* Re: [PATCH 09/12] i2c: icy: Constify the software node
  2021-03-29 10:50 ` [PATCH 09/12] i2c: icy: " Heikki Krogerus
@ 2021-03-30 13:58   ` Max Staudt
  2021-04-08 21:22     ` Wolfram Sang
  0 siblings, 1 reply; 38+ messages in thread
From: Max Staudt @ 2021-03-30 13:58 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: Wolfram Sang, linux-i2c, linux-kernel

This looks great, thank you for constifying this.

Finally it's clean again, yet much more flexible than the original
platform_data approach when I first submitted the driver.



Thanks everyone for your work

Max

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

* Re: [PATCH 10/12] platform/chrome: chromeos_laptop - Prepare complete software nodes
  2021-03-29 10:50 ` [PATCH 10/12] platform/chrome: chromeos_laptop - Prepare complete software nodes Heikki Krogerus
@ 2021-03-30 16:33   ` Enric Balletbo i Serra
  0 siblings, 0 replies; 38+ messages in thread
From: Enric Balletbo i Serra @ 2021-03-30 16:33 UTC (permalink / raw)
  To: Heikki Krogerus, Wolfram Sang; +Cc: linux-i2c, linux-kernel, Benson Leung

Hi Heikki,

Thank you for your patch.

On 29/3/21 12:50, Heikki Krogerus wrote:
> The older device property API is going to be removed soon
> and that will affect also I2C subystem. Supplying complete
> software nodes instead of only the properties in them for
> the I2C devices.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Benson Leung <bleung@chromium.org>
> Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>

Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>

> ---
>  drivers/platform/chrome/chromeos_laptop.c | 100 +++++++++++++---------
>  1 file changed, 60 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
> index 472a03daa8693..4e14b4d6635d7 100644
> --- a/drivers/platform/chrome/chromeos_laptop.c
> +++ b/drivers/platform/chrome/chromeos_laptop.c
> @@ -52,12 +52,15 @@ struct i2c_peripheral {
>  	enum i2c_adapter_type type;
>  	u32 pci_devid;
>  
> +	const struct property_entry *properties;
> +
>  	struct i2c_client *client;
>  };
>  
>  struct acpi_peripheral {
>  	char hid[ACPI_ID_LEN];
> -	const struct property_entry *properties;
> +	struct software_node swnode;
> +	struct i2c_client *client;
>  };
>  
>  struct chromeos_laptop {
> @@ -68,7 +71,7 @@ struct chromeos_laptop {
>  	struct i2c_peripheral *i2c_peripherals;
>  	unsigned int num_i2c_peripherals;
>  
> -	const struct acpi_peripheral *acpi_peripherals;
> +	struct acpi_peripheral *acpi_peripherals;
>  	unsigned int num_acpi_peripherals;
>  };
>  
> @@ -161,7 +164,7 @@ static void chromeos_laptop_check_adapter(struct i2c_adapter *adapter)
>  
>  static bool chromeos_laptop_adjust_client(struct i2c_client *client)
>  {
> -	const struct acpi_peripheral *acpi_dev;
> +	struct acpi_peripheral *acpi_dev;
>  	struct acpi_device_id acpi_ids[2] = { };
>  	int i;
>  	int error;
> @@ -175,8 +178,7 @@ static bool chromeos_laptop_adjust_client(struct i2c_client *client)
>  		memcpy(acpi_ids[0].id, acpi_dev->hid, ACPI_ID_LEN);
>  
>  		if (acpi_match_device(acpi_ids, &client->dev)) {
> -			error = device_add_properties(&client->dev,
> -						      acpi_dev->properties);
> +			error = device_add_software_node(&client->dev, &acpi_dev->swnode);
>  			if (error) {
>  				dev_err(&client->dev,
>  					"failed to add properties: %d\n",
> @@ -184,6 +186,8 @@ static bool chromeos_laptop_adjust_client(struct i2c_client *client)
>  				break;
>  			}
>  
> +			acpi_dev->client = client;
> +
>  			return true;
>  		}
>  	}
> @@ -193,15 +197,28 @@ static bool chromeos_laptop_adjust_client(struct i2c_client *client)
>  
>  static void chromeos_laptop_detach_i2c_client(struct i2c_client *client)
>  {
> +	struct acpi_peripheral *acpi_dev;
>  	struct i2c_peripheral *i2c_dev;
>  	int i;
>  
> -	for (i = 0; i < cros_laptop->num_i2c_peripherals; i++) {
> -		i2c_dev = &cros_laptop->i2c_peripherals[i];
> +	if (has_acpi_companion(&client->dev))
> +		for (i = 0; i < cros_laptop->num_acpi_peripherals; i++) {
> +			acpi_dev = &cros_laptop->acpi_peripherals[i];
>  
> -		if (i2c_dev->client == client)
> -			i2c_dev->client = NULL;
> -	}
> +			if (acpi_dev->client == client) {
> +				acpi_dev->client = NULL;
> +				return;
> +			}
> +		}
> +	else
> +		for (i = 0; i < cros_laptop->num_i2c_peripherals; i++) {
> +			i2c_dev = &cros_laptop->i2c_peripherals[i];
> +
> +			if (i2c_dev->client == client) {
> +				i2c_dev->client = NULL;
> +				return;
> +			}
> +		}
>  }
>  
>  static int chromeos_laptop_i2c_notifier_call(struct notifier_block *nb,
> @@ -302,28 +319,26 @@ static struct i2c_peripheral chromebook_pixel_peripherals[] __initdata = {
>  		.board_info	= {
>  			I2C_BOARD_INFO("atmel_mxt_ts",
>  					ATMEL_TS_I2C_ADDR),
> -			.properties	=
> -				chromebook_atmel_touchscreen_props,
>  			.flags		= I2C_CLIENT_WAKE,
>  		},
>  		.dmi_name	= "touchscreen",
>  		.irqflags	= IRQF_TRIGGER_FALLING,
>  		.type		= I2C_ADAPTER_PANEL,
>  		.alt_addr	= ATMEL_TS_I2C_BL_ADDR,
> +		.properties	= chromebook_atmel_touchscreen_props,
>  	},
>  	/* Touchpad. */
>  	{
>  		.board_info	= {
>  			I2C_BOARD_INFO("atmel_mxt_tp",
>  					ATMEL_TP_I2C_ADDR),
> -			.properties	=
> -				chromebook_pixel_trackpad_props,
>  			.flags		= I2C_CLIENT_WAKE,
>  		},
>  		.dmi_name	= "trackpad",
>  		.irqflags	= IRQF_TRIGGER_FALLING,
>  		.type		= I2C_ADAPTER_VGADDC,
>  		.alt_addr	= ATMEL_TP_I2C_BL_ADDR,
> +		.properties	= chromebook_pixel_trackpad_props,
>  	},
>  	/* Light Sensor. */
>  	{
> @@ -414,8 +429,6 @@ static struct i2c_peripheral acer_c720_peripherals[] __initdata = {
>  		.board_info	= {
>  			I2C_BOARD_INFO("atmel_mxt_ts",
>  					ATMEL_TS_I2C_ADDR),
> -			.properties	=
> -				chromebook_atmel_touchscreen_props,
>  			.flags		= I2C_CLIENT_WAKE,
>  		},
>  		.dmi_name	= "touchscreen",
> @@ -423,6 +436,7 @@ static struct i2c_peripheral acer_c720_peripherals[] __initdata = {
>  		.type		= I2C_ADAPTER_DESIGNWARE,
>  		.pci_devid	= PCI_DEVID(0, PCI_DEVFN(0x15, 0x2)),
>  		.alt_addr	= ATMEL_TS_I2C_BL_ADDR,
> +		.properties	= chromebook_atmel_touchscreen_props,
>  	},
>  	/* Touchpad. */
>  	{
> @@ -498,12 +512,16 @@ static struct acpi_peripheral samus_peripherals[] __initdata = {
>  	/* Touchpad */
>  	{
>  		.hid		= "ATML0000",
> -		.properties	= samus_trackpad_props,
> +		.swnode		= {
> +			.properties = samus_trackpad_props,
> +		},
>  	},
>  	/* Touchsceen */
>  	{
>  		.hid		= "ATML0001",
> -		.properties	= chromebook_atmel_touchscreen_props,
> +		.swnode		= {
> +			.properties = chromebook_atmel_touchscreen_props,
> +		},
>  	},
>  };
>  DECLARE_ACPI_CROS_LAPTOP(samus);
> @@ -512,12 +530,16 @@ static struct acpi_peripheral generic_atmel_peripherals[] __initdata = {
>  	/* Touchpad */
>  	{
>  		.hid		= "ATML0000",
> -		.properties	= chromebook_pixel_trackpad_props,
> +		.swnode		= {
> +			.properties = chromebook_pixel_trackpad_props,
> +		},
>  	},
>  	/* Touchsceen */
>  	{
>  		.hid		= "ATML0001",
> -		.properties	= chromebook_atmel_touchscreen_props,
> +		.swnode		= {
> +			.properties = chromebook_atmel_touchscreen_props,
> +		},
>  	},
>  };
>  DECLARE_ACPI_CROS_LAPTOP(generic_atmel);
> @@ -743,12 +765,11 @@ chromeos_laptop_prepare_i2c_peripherals(struct chromeos_laptop *cros_laptop,
>  		if (error)
>  			goto err_out;
>  
> -		/* We need to deep-copy properties */
> -		if (info->properties) {
> -			info->properties =
> -				property_entries_dup(info->properties);
> -			if (IS_ERR(info->properties)) {
> -				error = PTR_ERR(info->properties);
> +		/* Create primary fwnode for the device - copies everything */
> +		if (i2c_dev->properties) {
> +			info->fwnode = fwnode_create_software_node(i2c_dev->properties, NULL);
> +			if (IS_ERR(info->fwnode)) {
> +				error = PTR_ERR(info->fwnode);
>  				goto err_out;
>  			}
>  		}
> @@ -760,8 +781,8 @@ chromeos_laptop_prepare_i2c_peripherals(struct chromeos_laptop *cros_laptop,
>  	while (--i >= 0) {
>  		i2c_dev = &cros_laptop->i2c_peripherals[i];
>  		info = &i2c_dev->board_info;
> -		if (info->properties)
> -			property_entries_free(info->properties);
> +		if (!IS_ERR_OR_NULL(info->fwnode))
> +			fwnode_remove_software_node(info->fwnode);
>  	}
>  	kfree(cros_laptop->i2c_peripherals);
>  	return error;
> @@ -801,11 +822,11 @@ chromeos_laptop_prepare_acpi_peripherals(struct chromeos_laptop *cros_laptop,
>  		*acpi_dev = *src_dev;
>  
>  		/* We need to deep-copy properties */
> -		if (src_dev->properties) {
> -			acpi_dev->properties =
> -				property_entries_dup(src_dev->properties);
> -			if (IS_ERR(acpi_dev->properties)) {
> -				error = PTR_ERR(acpi_dev->properties);
> +		if (src_dev->swnode.properties) {
> +			acpi_dev->swnode.properties =
> +				property_entries_dup(src_dev->swnode.properties);
> +			if (IS_ERR(acpi_dev->swnode.properties)) {
> +				error = PTR_ERR(acpi_dev->swnode.properties);
>  				goto err_out;
>  			}
>  		}
> @@ -821,8 +842,8 @@ chromeos_laptop_prepare_acpi_peripherals(struct chromeos_laptop *cros_laptop,
>  err_out:
>  	while (--i >= 0) {
>  		acpi_dev = &acpi_peripherals[i];
> -		if (acpi_dev->properties)
> -			property_entries_free(acpi_dev->properties);
> +		if (!IS_ERR_OR_NULL(acpi_dev->swnode.properties))
> +			property_entries_free(acpi_dev->swnode.properties);
>  	}
>  
>  	kfree(acpi_peripherals);
> @@ -833,21 +854,20 @@ static void chromeos_laptop_destroy(const struct chromeos_laptop *cros_laptop)
>  {
>  	const struct acpi_peripheral *acpi_dev;
>  	struct i2c_peripheral *i2c_dev;
> -	struct i2c_board_info *info;
>  	int i;
>  
>  	for (i = 0; i < cros_laptop->num_i2c_peripherals; i++) {
>  		i2c_dev = &cros_laptop->i2c_peripherals[i];
> -		info = &i2c_dev->board_info;
> -
>  		i2c_unregister_device(i2c_dev->client);
> -		property_entries_free(info->properties);
>  	}
>  
>  	for (i = 0; i < cros_laptop->num_acpi_peripherals; i++) {
>  		acpi_dev = &cros_laptop->acpi_peripherals[i];
>  
> -		property_entries_free(acpi_dev->properties);
> +		if (acpi_dev->client)
> +			device_remove_software_node(&acpi_dev->client->dev);
> +
> +		property_entries_free(acpi_dev->swnode.properties);
>  	}
>  
>  	kfree(cros_laptop->i2c_peripherals);
> 

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

* Re: [PATCH 03/12] ARM: omap1: osk: Constify the software node
  2021-03-29 10:50 ` [PATCH 03/12] ARM: omap1: osk: Constify the software node Heikki Krogerus
@ 2021-03-31  6:15   ` Tony Lindgren
  0 siblings, 0 replies; 38+ messages in thread
From: Tony Lindgren @ 2021-03-31  6:15 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: Wolfram Sang, linux-i2c, linux-kernel, Aaro Koskinen

* Heikki Krogerus <heikki.krogerus@linux.intel.com> [210329 10:51]:
> Additional device properties are always just a part of a
> software fwnode. If the device properties are constant, the
> software node can also be constant.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
> Cc: Tony Lindgren <tony@atomide.com>

Probably best to merge this via the rest of the series:

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  arch/arm/mach-omap1/board-osk.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
> index 0a4c9b0b13b0c..e18b6f13300eb 100644
> --- a/arch/arm/mach-omap1/board-osk.c
> +++ b/arch/arm/mach-omap1/board-osk.c
> @@ -332,11 +332,15 @@ static const struct property_entry mistral_at24_properties[] = {
>  	{ }
>  };
>  
> +static const struct software_node mistral_at24_node = {
> +	.properties = mistral_at24_properties,
> +};
> +
>  static struct i2c_board_info __initdata mistral_i2c_board_info[] = {
>  	{
>  		/* NOTE:  powered from LCD supply */
>  		I2C_BOARD_INFO("24c04", 0x50),
> -		.properties = mistral_at24_properties,
> +		.swnode = &mistral_at24_node,
>  	},
>  	/* TODO when driver support is ready:
>  	 *  - optionally ov9640 camera sensor at 0x30
> -- 
> 2.30.2
> 

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

* Re: [PATCH 00/12] i2c: Adding support for software nodes
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (11 preceding siblings ...)
  2021-03-29 10:50 ` [PATCH 12/12] i2c: Remove support for dangling device properties Heikki Krogerus
@ 2021-03-31  9:22 ` Wolfram Sang
  2021-03-31 10:17   ` Heikki Krogerus
  2021-04-08 21:53 ` Wolfram Sang
  2021-04-10 19:48 ` Wolfram Sang
  14 siblings, 1 reply; 38+ messages in thread
From: Wolfram Sang @ 2021-03-31  9:22 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]


> The old device property API (device_add_properties()) is going to be
> removed. These prepare the i2c subsystem and drivers for the change.
> The change is fairly trivial in case of i2c. All we need to do is add
> complete software nodes to the devices instead of only the device
> properties in those nodes.

This looks like a nice cleanup!

Reviewed-by: Wolfram Sang <wsa@kernel.org> # for the I2C parts

Which tree should this go into? I can offer I2C but am also fine with
another one...


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 00/12] i2c: Adding support for software nodes
  2021-03-31  9:22 ` [PATCH 00/12] i2c: Adding support for software nodes Wolfram Sang
@ 2021-03-31 10:17   ` Heikki Krogerus
  2021-04-06 19:37     ` Wolfram Sang
  0 siblings, 1 reply; 38+ messages in thread
From: Heikki Krogerus @ 2021-03-31 10:17 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel

On Wed, Mar 31, 2021 at 11:22:32AM +0200, Wolfram Sang wrote:
> 
> > The old device property API (device_add_properties()) is going to be
> > removed. These prepare the i2c subsystem and drivers for the change.
> > The change is fairly trivial in case of i2c. All we need to do is add
> > complete software nodes to the devices instead of only the device
> > properties in those nodes.
> 
> This looks like a nice cleanup!
> 
> Reviewed-by: Wolfram Sang <wsa@kernel.org> # for the I2C parts
> 
> Which tree should this go into? I can offer I2C but am also fine with
> another one...

I think these go via I2C tree.

thanks,

-- 
heikki

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

* Re: [PATCH 05/12] ARM: s3c: mini2440: Constify the software node
  2021-03-29 12:32     ` Heikki Krogerus
@ 2021-04-01 17:44       ` Krzysztof Kozlowski
  2021-04-06 19:40         ` Wolfram Sang
  0 siblings, 1 reply; 38+ messages in thread
From: Krzysztof Kozlowski @ 2021-04-01 17:44 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: Wolfram Sang, linux-i2c, linux-kernel

On 29/03/2021 14:32, Heikki Krogerus wrote:
> On Mon, Mar 29, 2021 at 12:58:41PM +0200, Krzysztof Kozlowski wrote:
>> On 29/03/2021 12:50, Heikki Krogerus wrote:
>>> Additional device properties are always just a part of a
>>> software fwnode. If the device properties are constant, the
>>> software node can also be constant.
>>>
>> Hi,
>>
>> Thanks for your work.
>>
>> I did not get the cover letter nor other patches from this set and I
>> don't see how the i2c uses the swnode. This makes difficult to judge
>> whether this looks reasonable. At least without the context the title
>> looks misleading - you add software_node or change to use software_node
>> instead of constifying it.
> 
> OK, I'll try to open this up somehow...
> 
> Whenever additional device properties are added to devices by using
> the old device property API (device_add_properties()) that also i2c
> core code uses, in reality a software node is always created to hold
> those properties. It's just always dynamically allocated.
> 
> The goal of this series is to prepare the i2c subsystem and drivers
> for the removal of that old device property API, but I did not see
> that as relevant info for this patch, because even if we did not in
> the end remove that old API, this change is still useful.
> 
> The patch does exactly what the subject says. After this we supply the
> device a constant software node instead of a dynamically allocated one.

Thanks for explanation. The follow up question is - can I take it
independently via ARM Samsung/S3C tree?

Best regards,
Krzysztof

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

* Re: [PATCH 00/12] i2c: Adding support for software nodes
  2021-03-31 10:17   ` Heikki Krogerus
@ 2021-04-06 19:37     ` Wolfram Sang
  0 siblings, 0 replies; 38+ messages in thread
From: Wolfram Sang @ 2021-04-06 19:37 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 120 bytes --]


> I think these go via I2C tree.

Good, I'll apply it this weekend. Until then, let's hope we can get some
more acks.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 02/12] ARM: davinci: Constify the software nodes
  2021-03-29 10:50 ` [PATCH 02/12] ARM: davinci: Constify the " Heikki Krogerus
@ 2021-04-06 19:38   ` Wolfram Sang
  2021-04-07  7:41     ` Bartosz Golaszewski
  0 siblings, 1 reply; 38+ messages in thread
From: Wolfram Sang @ 2021-04-06 19:38 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: linux-i2c, linux-kernel, Sekhar Nori, Bartosz Golaszewski

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]

On Mon, Mar 29, 2021 at 01:50:37PM +0300, Heikki Krogerus wrote:
> Additional device properties are always just a part of a
> software fwnode. If the device properties are constant, the
> software node can also be constant.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Sekhar Nori <nsekhar@ti.com>
> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>

I like to apply it soon. Can we get an ack, please?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 04/12] ARM: pxa: stargate2: Constify the software node
  2021-03-29 10:50 ` [PATCH 04/12] ARM: pxa: stargate2: " Heikki Krogerus
@ 2021-04-06 19:39   ` Wolfram Sang
  2021-04-10  8:16     ` Robert Jarzmik
  0 siblings, 1 reply; 38+ messages in thread
From: Wolfram Sang @ 2021-04-06 19:39 UTC (permalink / raw)
  To: Heikki Krogerus
  Cc: linux-i2c, linux-kernel, Jonathan Cameron, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

On Mon, Mar 29, 2021 at 01:50:39PM +0300, Heikki Krogerus wrote:
> Additional device properties are always just a part of a
> software fwnode. If the device properties are constant, the
> software node can also be constant.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Jonathan Cameron <jic23@cam.ac.uk>
> Cc: Daniel Mack <daniel@zonque.org>
> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
> Cc: Robert Jarzmik <robert.jarzmik@free.fr>

I like to apply it soon. Can we get an ack, please?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 05/12] ARM: s3c: mini2440: Constify the software node
  2021-04-01 17:44       ` Krzysztof Kozlowski
@ 2021-04-06 19:40         ` Wolfram Sang
  2021-04-06 20:28           ` Krzysztof Kozlowski
  0 siblings, 1 reply; 38+ messages in thread
From: Wolfram Sang @ 2021-04-06 19:40 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Heikki Krogerus, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]


> Thanks for explanation. The follow up question is - can I take it
> independently via ARM Samsung/S3C tree?

Is it possible to just ack it, so I can take this all via I2C? Or will
there be merge conflicts. I can provide an immutable branch, of course.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 06/12] platform/x86: intel_cht_int33fe_microb: Constify the software node
  2021-03-29 15:27   ` Hans de Goede
@ 2021-04-06 19:40     ` Wolfram Sang
  2021-04-06 19:49       ` Hans de Goede
  0 siblings, 1 reply; 38+ messages in thread
From: Wolfram Sang @ 2021-04-06 19:40 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Heikki Krogerus, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 91 bytes --]


> What is the plan for merging this patch / this series ?

I'll take the series via I2C.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 06/12] platform/x86: intel_cht_int33fe_microb: Constify the software node
  2021-04-06 19:40     ` Wolfram Sang
@ 2021-04-06 19:49       ` Hans de Goede
  0 siblings, 0 replies; 38+ messages in thread
From: Hans de Goede @ 2021-04-06 19:49 UTC (permalink / raw)
  To: Wolfram Sang, Heikki Krogerus, linux-i2c, linux-kernel

Hi,

On 4/6/21 9:40 PM, Wolfram Sang wrote:
> 
>> What is the plan for merging this patch / this series ?
> 
> I'll take the series via I2C.

Ok, that works for me.

Regards,

Hans


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

* Re: [PATCH 05/12] ARM: s3c: mini2440: Constify the software node
  2021-04-06 19:40         ` Wolfram Sang
@ 2021-04-06 20:28           ` Krzysztof Kozlowski
  0 siblings, 0 replies; 38+ messages in thread
From: Krzysztof Kozlowski @ 2021-04-06 20:28 UTC (permalink / raw)
  To: Wolfram Sang, Heikki Krogerus, linux-i2c, linux-kernel

On 06/04/2021 21:40, Wolfram Sang wrote:
> 
>> Thanks for explanation. The follow up question is - can I take it
>> independently via ARM Samsung/S3C tree?
> 
> Is it possible to just ack it, so I can take this all via I2C? Or will
> there be merge conflicts. I can provide an immutable branch, of course.
> 

Sure, ack is possible (from my currently used email):
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof

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

* Re: [PATCH 02/12] ARM: davinci: Constify the software nodes
  2021-04-06 19:38   ` Wolfram Sang
@ 2021-04-07  7:41     ` Bartosz Golaszewski
  0 siblings, 0 replies; 38+ messages in thread
From: Bartosz Golaszewski @ 2021-04-07  7:41 UTC (permalink / raw)
  To: Wolfram Sang, Heikki Krogerus, linux-i2c, LKML, Sekhar Nori,
	Bartosz Golaszewski

On Tue, Apr 6, 2021 at 9:38 PM Wolfram Sang <wsa@kernel.org> wrote:
>
> On Mon, Mar 29, 2021 at 01:50:37PM +0300, Heikki Krogerus wrote:
> > Additional device properties are always just a part of a
> > software fwnode. If the device properties are constant, the
> > software node can also be constant.
> >
> > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > Cc: Sekhar Nori <nsekhar@ti.com>
> > Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> I like to apply it soon. Can we get an ack, please?
>

Looks good to me.

Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

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

* Re: [PATCH 09/12] i2c: icy: Constify the software node
  2021-03-30 13:58   ` Max Staudt
@ 2021-04-08 21:22     ` Wolfram Sang
  2021-04-08 22:13       ` Max Staudt
  0 siblings, 1 reply; 38+ messages in thread
From: Wolfram Sang @ 2021-04-08 21:22 UTC (permalink / raw)
  To: Max Staudt; +Cc: Heikki Krogerus, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

On Tue, Mar 30, 2021 at 03:58:56PM +0200, Max Staudt wrote:
> This looks great, thank you for constifying this.
> 
> Finally it's clean again, yet much more flexible than the original
> platform_data approach when I first submitted the driver.

I read this as "Reviewed-by" ;)


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 00/12] i2c: Adding support for software nodes
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (12 preceding siblings ...)
  2021-03-31  9:22 ` [PATCH 00/12] i2c: Adding support for software nodes Wolfram Sang
@ 2021-04-08 21:53 ` Wolfram Sang
  2021-04-09  9:39   ` Heikki Krogerus
  2021-04-10 19:48 ` Wolfram Sang
  14 siblings, 1 reply; 38+ messages in thread
From: Wolfram Sang @ 2021-04-08 21:53 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

On Mon, Mar 29, 2021 at 01:50:35PM +0300, Heikki Krogerus wrote:
> Hi,
> 
> The old device property API (device_add_properties()) is going to be
> removed. These prepare the i2c subsystem and drivers for the change.
> The change is fairly trivial in case of i2c. All we need to do is add
> complete software nodes to the devices instead of only the device
> properties in those nodes.
> 
> thanks,
> 
> Heikki Krogerus (12):
>   i2c: Add support for software nodes
>   ARM: davinci: Constify the software nodes
>   ARM: omap1: osk: Constify the software node
>   ARM: pxa: stargate2: Constify the software node
>   ARM: s3c: mini2440: Constify the software node
>   platform/x86: intel_cht_int33fe_microb: Constify the software node
>   i2c: cht-wc: Constify the software node
>   i2c: nvidia-gpu: Constify the software node
>   i2c: icy: Constify the software node
>   platform/chrome: chromeos_laptop - Prepare complete software nodes
>   Input: elantech - Prepare a complete software node for the device
>   i2c: Remove support for dangling device properties

I applied all patches to an immutable branch "i2c/software-nodes" now.
Once buildbot successfully checked this branch, I will merge it into
for-next and advertise it to interested parties.

Thanks for this work!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 09/12] i2c: icy: Constify the software node
  2021-04-08 21:22     ` Wolfram Sang
@ 2021-04-08 22:13       ` Max Staudt
  0 siblings, 0 replies; 38+ messages in thread
From: Max Staudt @ 2021-04-08 22:13 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Heikki Krogerus, linux-i2c, linux-kernel

On Thu, 8 Apr 2021 23:22:51 +0200
Wolfram Sang <wsa@kernel.org> wrote:

> I read this as "Reviewed-by" ;)

Sure, why not :)


Reviewed-by: Max Staudt <max@enpas.org>

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

* Re: [PATCH 00/12] i2c: Adding support for software nodes
  2021-04-08 21:53 ` Wolfram Sang
@ 2021-04-09  9:39   ` Heikki Krogerus
  0 siblings, 0 replies; 38+ messages in thread
From: Heikki Krogerus @ 2021-04-09  9:39 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c, linux-kernel

On Thu, Apr 08, 2021 at 11:53:23PM +0200, Wolfram Sang wrote:
> On Mon, Mar 29, 2021 at 01:50:35PM +0300, Heikki Krogerus wrote:
> > Hi,
> > 
> > The old device property API (device_add_properties()) is going to be
> > removed. These prepare the i2c subsystem and drivers for the change.
> > The change is fairly trivial in case of i2c. All we need to do is add
> > complete software nodes to the devices instead of only the device
> > properties in those nodes.
> > 
> > thanks,
> > 
> > Heikki Krogerus (12):
> >   i2c: Add support for software nodes
> >   ARM: davinci: Constify the software nodes
> >   ARM: omap1: osk: Constify the software node
> >   ARM: pxa: stargate2: Constify the software node
> >   ARM: s3c: mini2440: Constify the software node
> >   platform/x86: intel_cht_int33fe_microb: Constify the software node
> >   i2c: cht-wc: Constify the software node
> >   i2c: nvidia-gpu: Constify the software node
> >   i2c: icy: Constify the software node
> >   platform/chrome: chromeos_laptop - Prepare complete software nodes
> >   Input: elantech - Prepare a complete software node for the device
> >   i2c: Remove support for dangling device properties
> 
> I applied all patches to an immutable branch "i2c/software-nodes" now.
> Once buildbot successfully checked this branch, I will merge it into
> for-next and advertise it to interested parties.

Thank you!


-- 
heikki

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

* Re: [PATCH 04/12] ARM: pxa: stargate2: Constify the software node
  2021-04-06 19:39   ` Wolfram Sang
@ 2021-04-10  8:16     ` Robert Jarzmik
  0 siblings, 0 replies; 38+ messages in thread
From: Robert Jarzmik @ 2021-04-10  8:16 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Heikki Krogerus, linux-i2c, linux-kernel, Jonathan Cameron,
	Daniel Mack, Haojian Zhuang

Wolfram Sang <wsa@kernel.org> writes:

> On Mon, Mar 29, 2021 at 01:50:39PM +0300, Heikki Krogerus wrote:
>> Additional device properties are always just a part of a
>> software fwnode. If the device properties are constant, the
>> software node can also be constant.
>> 
>> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
>> Cc: Jonathan Cameron <jic23@cam.ac.uk>
>> Cc: Daniel Mack <daniel@zonque.org>
>> Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
>> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
>
> I like to apply it soon. Can we get an ack, please?
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

-- 
Robert

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

* Re: [PATCH 00/12] i2c: Adding support for software nodes
  2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
                   ` (13 preceding siblings ...)
  2021-04-08 21:53 ` Wolfram Sang
@ 2021-04-10 19:48 ` Wolfram Sang
  14 siblings, 0 replies; 38+ messages in thread
From: Wolfram Sang @ 2021-04-10 19:48 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]

On Mon, Mar 29, 2021 at 01:50:35PM +0300, Heikki Krogerus wrote:
> Hi,
> 
> The old device property API (device_add_properties()) is going to be
> removed. These prepare the i2c subsystem and drivers for the change.
> The change is fairly trivial in case of i2c. All we need to do is add
> complete software nodes to the devices instead of only the device
> properties in those nodes.
> 
> thanks,
> 
> Heikki Krogerus (12):
>   i2c: Add support for software nodes
>   ARM: davinci: Constify the software nodes
>   ARM: omap1: osk: Constify the software node
>   ARM: pxa: stargate2: Constify the software node
>   ARM: s3c: mini2440: Constify the software node
>   platform/x86: intel_cht_int33fe_microb: Constify the software node
>   i2c: cht-wc: Constify the software node
>   i2c: nvidia-gpu: Constify the software node
>   i2c: icy: Constify the software node
>   platform/chrome: chromeos_laptop - Prepare complete software nodes
>   Input: elantech - Prepare a complete software node for the device
>   i2c: Remove support for dangling device properties

Merged the immutable branch (with added tag from Robert) to for-next
now. Branch is here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/software-nodes

tag: <i2c-software-nodes-20210410>

Thank you, Heikki and all reviewers!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-04-10 19:48 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 10:50 [PATCH 00/12] i2c: Adding support for software nodes Heikki Krogerus
2021-03-29 10:50 ` [PATCH 01/12] i2c: Add " Heikki Krogerus
2021-03-29 10:50 ` [PATCH 02/12] ARM: davinci: Constify the " Heikki Krogerus
2021-04-06 19:38   ` Wolfram Sang
2021-04-07  7:41     ` Bartosz Golaszewski
2021-03-29 10:50 ` [PATCH 03/12] ARM: omap1: osk: Constify the software node Heikki Krogerus
2021-03-31  6:15   ` Tony Lindgren
2021-03-29 10:50 ` [PATCH 04/12] ARM: pxa: stargate2: " Heikki Krogerus
2021-04-06 19:39   ` Wolfram Sang
2021-04-10  8:16     ` Robert Jarzmik
2021-03-29 10:50 ` [PATCH 05/12] ARM: s3c: mini2440: " Heikki Krogerus
2021-03-29 10:58   ` Krzysztof Kozlowski
2021-03-29 12:32     ` Heikki Krogerus
2021-04-01 17:44       ` Krzysztof Kozlowski
2021-04-06 19:40         ` Wolfram Sang
2021-04-06 20:28           ` Krzysztof Kozlowski
2021-03-29 10:50 ` [PATCH 06/12] platform/x86: intel_cht_int33fe_microb: " Heikki Krogerus
2021-03-29 15:27   ` Hans de Goede
2021-04-06 19:40     ` Wolfram Sang
2021-04-06 19:49       ` Hans de Goede
2021-03-29 10:50 ` [PATCH 07/12] i2c: cht-wc: " Heikki Krogerus
2021-03-29 15:28   ` Hans de Goede
2021-03-29 10:50 ` [PATCH 08/12] i2c: nvidia-gpu: " Heikki Krogerus
2021-03-29 10:50 ` [PATCH 09/12] i2c: icy: " Heikki Krogerus
2021-03-30 13:58   ` Max Staudt
2021-04-08 21:22     ` Wolfram Sang
2021-04-08 22:13       ` Max Staudt
2021-03-29 10:50 ` [PATCH 10/12] platform/chrome: chromeos_laptop - Prepare complete software nodes Heikki Krogerus
2021-03-30 16:33   ` Enric Balletbo i Serra
2021-03-29 10:50 ` [PATCH 11/12] Input: elantech - Prepare a complete software node for the device Heikki Krogerus
2021-03-29 19:05   ` Dmitry Torokhov
2021-03-29 10:50 ` [PATCH 12/12] i2c: Remove support for dangling device properties Heikki Krogerus
2021-03-31  9:22 ` [PATCH 00/12] i2c: Adding support for software nodes Wolfram Sang
2021-03-31 10:17   ` Heikki Krogerus
2021-04-06 19:37     ` Wolfram Sang
2021-04-08 21:53 ` Wolfram Sang
2021-04-09  9:39   ` Heikki Krogerus
2021-04-10 19:48 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).