All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the pm tree with the i2c tree
@ 2016-07-15  2:17 Stephen Rothwell
  2016-07-15  2:28 ` Stephen Rothwell
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2016-07-15  2:17 UTC (permalink / raw)
  To: Rafael J. Wysocki, Wolfram Sang
  Cc: linux-next, linux-kernel, Octavian Purdila, Jarkko Nikula,
	Andy Shevchenko, Mika Westerberg

Hi Rafael,

Today's linux-next merge of the pm tree got a conflict in:

  drivers/i2c/i2c-core.c

between commit:

  a7003b65801e ("i2c: core: Cleanup I2C ACPI namespace")
  55d38d060e99 ("i2c: core: Add function for finding the bus speed from ACPI")

from the i2c tree and commit:

  525e6fabeae2 ("i2c / ACPI: add support for ACPI reconfigure notifications")

from the pm tree.

I fixed it up (I think, but it needs more work - see below) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/i2c/i2c-core.c
index 77ce28f2dd4c,74e5aeaf84f9..000000000000
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@@ -103,20 -101,17 +103,19 @@@ struct gsb_buffer 
  	};
  } __packed;
  
 -struct acpi_i2c_lookup {
 +struct i2c_acpi_lookup {
  	struct i2c_board_info *info;
 +	struct i2c_adapter *adapter; /* set only when registering slaves */
  	acpi_handle adapter_handle;
  	acpi_handle device_handle;
 +	u32 min_speed;
  };
  
 -static int acpi_i2c_fill_info(struct acpi_resource *ares, void *data)
 +static int i2c_acpi_find_resource(struct acpi_resource *ares, void *data)
  {
 -	struct acpi_i2c_lookup *lookup = data;
 +	struct i2c_acpi_lookup *lookup = data;
  	struct i2c_board_info *info = lookup->info;
  	struct acpi_resource_i2c_serialbus *sb;
- 	acpi_handle adapter_handle;
  	acpi_status status;
  
  	if (info->addr || ares->type != ACPI_RESOURCE_TYPE_SERIAL_BUS)
@@@ -126,97 -121,110 +125,181 @@@
  	if (sb->type != ACPI_RESOURCE_SERIAL_TYPE_I2C)
  		return 1;
  
- 	/*
- 	 * Extract the ResourceSource and make sure that the handle matches
- 	 * with the I2C adapter handle.
- 	 */
  	status = acpi_get_handle(lookup->device_handle,
  				 sb->resource_source.string_ptr,
- 				 &adapter_handle);
- 	if (ACPI_SUCCESS(status) && adapter_handle == lookup->adapter_handle) {
- 		info->addr = sb->slave_address;
- 		if (sb->access_mode == ACPI_I2C_10BIT_MODE)
- 			info->flags |= I2C_CLIENT_TEN;
- 		/* Save speed of the slowest device */
- 		if (sb->connection_speed < lookup->min_speed)
- 			lookup->min_speed = sb->connection_speed;
- 	}
+ 				 &lookup->adapter_handle);
+ 	if (!ACPI_SUCCESS(status))
+ 		return 1;
+ 
+ 	info->addr = sb->slave_address;
+ 	if (sb->access_mode == ACPI_I2C_10BIT_MODE)
+ 		info->flags |= I2C_CLIENT_TEN;
++	/* Save speed of the slowest device */
++	if (sb->connection_speed < lookup->min_speed)
++		lookup->min_speed = sb->connection_speed;
  
  	return 1;
  }
  
 -static int acpi_i2c_get_info(struct acpi_device *adev,
 +static acpi_status i2c_acpi_slave_lookup(acpi_handle handle, u32 level,
 +					 void *data, void **return_value)
 +{
 +	struct i2c_acpi_lookup *lookup = data;
 +	struct i2c_adapter *adapter = lookup->adapter;
 +	struct list_head resource_list;
 +	struct resource_entry *entry;
 +	struct i2c_board_info info;
 +	struct acpi_device *adev;
 +	int ret;
 +
 +	if (acpi_bus_get_device(handle, &adev))
 +		return AE_OK;
 +	if (acpi_bus_get_status(adev) || !adev->status.present)
 +		return AE_OK;
 +
 +	memset(&info, 0, sizeof(info));
 +	info.fwnode = acpi_fwnode_handle(adev);
 +
 +	lookup->device_handle = handle;
 +	lookup->info = &info;
 +
 +	/*
 +	 * Look up for I2cSerialBus resource with ResourceSource that
 +	 * matches with this adapter.
 +	 */
 +	INIT_LIST_HEAD(&resource_list);
 +	ret = acpi_dev_get_resources(adev, &resource_list,
 +				     i2c_acpi_find_resource, lookup);
 +	acpi_dev_free_resource_list(&resource_list);
 +
 +	if (ret < 0 || !info.addr || !lookup->adapter)
 +		return AE_OK;
 +
 +	/* Then fill IRQ number if any */
 +	ret = acpi_dev_get_resources(adev, &resource_list, NULL, NULL);
 +	if (ret < 0)
 +		return AE_OK;
 +
 +	resource_list_for_each_entry(entry, &resource_list) {
 +		if (resource_type(entry->res) == IORESOURCE_IRQ) {
 +			info.irq = entry->res->start;
 +			break;
 +		}
 +	}
 +
 +	acpi_dev_free_resource_list(&resource_list);
 +
 +	adev->power.flags.ignore_parent = true;
 +	strlcpy(info.type, dev_name(&adev->dev), sizeof(info.type));
 +	if (!i2c_new_device(adapter, &info)) {
 +		adev->power.flags.ignore_parent = false;
 +		dev_err(&adapter->dev,
 +			"failed to add I2C device %s from ACPI\n",
 +			dev_name(&adev->dev));
 +	}
 +
 +	return AE_OK;
 +}
 +
++static int i2c_acpi_get_info(struct acpi_device *adev,
+ 			     struct i2c_board_info *info,
+ 			     acpi_handle *adapter_handle)
+ {
+ 	struct list_head resource_list;
+ 	struct resource_entry *entry;
 -	struct acpi_i2c_lookup lookup;
++	struct i2c_acpi_lookup lookup;
+ 	int ret;
+ 
+ 	if (acpi_bus_get_status(adev) || !adev->status.present ||
+ 	    acpi_device_enumerated(adev))
+ 		return -EINVAL;
+ 
+ 	memset(info, 0, sizeof(*info));
+ 	info->fwnode = acpi_fwnode_handle(adev);
+ 
+ 	memset(&lookup, 0, sizeof(lookup));
+ 	lookup.device_handle = acpi_device_handle(adev);
+ 	lookup.info = info;
+ 
+ 	/* Look up for I2cSerialBus resource */
+ 	INIT_LIST_HEAD(&resource_list);
+ 	ret = acpi_dev_get_resources(adev, &resource_list,
 -				     acpi_i2c_fill_info, &lookup);
++				     i2c_acpi_find_resource, &lookup);
+ 	acpi_dev_free_resource_list(&resource_list);
+ 
+ 	if (ret < 0 || !info->addr)
+ 		return -EINVAL;
+ 
+ 	*adapter_handle = lookup.adapter_handle;
+ 
+ 	/* Then fill IRQ number if any */
+ 	ret = acpi_dev_get_resources(adev, &resource_list, NULL, NULL);
+ 	if (ret < 0)
+ 		return -EINVAL;
+ 
+ 	resource_list_for_each_entry(entry, &resource_list) {
+ 		if (resource_type(entry->res) == IORESOURCE_IRQ) {
+ 			info->irq = entry->res->start;
+ 			break;
+ 		}
+ 	}
+ 
+ 	acpi_dev_free_resource_list(&resource_list);
+ 
+ 	strlcpy(info->type, dev_name(&adev->dev), sizeof(info->type));
+ 
+ 	return 0;
+ }
+ 
 -static void acpi_i2c_register_device(struct i2c_adapter *adapter,
++static void i2c_acpi_register_device(struct i2c_adapter *adapter,
+ 				     struct acpi_device *adev,
+ 				     struct i2c_board_info *info)
+ {
+ 	adev->power.flags.ignore_parent = true;
+ 	acpi_device_set_enumerated(adev);
+ 
+ 	if (!i2c_new_device(adapter, info)) {
+ 		adev->power.flags.ignore_parent = false;
+ 		dev_err(&adapter->dev,
+ 			"failed to add I2C device %s from ACPI\n",
+ 			dev_name(&adev->dev));
+ 	}
+ }
+ 
 -static acpi_status acpi_i2c_add_device(acpi_handle handle, u32 level,
++static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
+ 				       void *data, void **return_value)
+ {
+ 	struct i2c_adapter *adapter = data;
+ 	struct acpi_device *adev;
+ 	acpi_handle adapter_handle;
+ 	struct i2c_board_info info;
+ 
+ 	if (acpi_bus_get_device(handle, &adev))
+ 		return AE_OK;
+ 
 -	if (acpi_i2c_get_info(adev, &info, &adapter_handle))
++	if (i2c_acpi_get_info(adev, &info, &adapter_handle))
+ 		return AE_OK;
+ 
+ 	if (adapter_handle != ACPI_HANDLE(&adapter->dev))
+ 		return AE_OK;
+ 
 -	acpi_i2c_register_device(adapter, adev, &info);
++	i2c_acpi_register_device(adapter, adev, &info);
+ 
+ 	return AE_OK;
+ }
+ 
 -#define ACPI_I2C_MAX_SCAN_DEPTH 32
 +#define I2C_ACPI_MAX_SCAN_DEPTH 32
 +
 +static acpi_status i2c_acpi_walk(struct i2c_acpi_lookup *lookup)
 +{
 +	return acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
 +				   I2C_ACPI_MAX_SCAN_DEPTH,
 +				   i2c_acpi_slave_lookup, NULL,
 +				   lookup, NULL);
 +}
  
  /**
 - * acpi_i2c_register_devices - enumerate I2C slave devices behind adapter
 + * i2c_acpi_register_devices - enumerate I2C slave devices behind adapter
   * @adap: pointer to adapter
   *
   * Enumerate all I2C slave devices behind this adapter by walking the ACPI
@@@ -240,39 -246,80 +323,111 @@@ static void i2c_acpi_register_devices(s
  		dev_warn(&adap->dev, "failed to enumerate I2C slaves\n");
  }
  
 -static int acpi_i2c_match_adapter(struct device *dev, void *data)
 +/**
 + * i2c_acpi_find_bus_speed - find I2C bus speed from ACPI
 + * @dev: The device owning the bus
 + *
 + * Find the I2C bus speed by walking the ACPI namespace for all I2C slaves
 + * devices connected to this bus and use the speed of slowest device.
 + *
 + * Returns the speed in Hz or zero
 + */
 +u32 i2c_acpi_find_bus_speed(struct device *dev)
 +{
 +	struct i2c_acpi_lookup lookup;
 +	acpi_status status;
 +
 +	if (!has_acpi_companion(dev))
 +		return 0;
 +
 +	memset(&lookup, 0, sizeof(lookup));
 +	lookup.adapter_handle = ACPI_HANDLE(dev);
 +	lookup.min_speed = UINT_MAX;
 +
 +	status = i2c_acpi_walk(&lookup);
 +	if (ACPI_FAILURE(status)) {
 +		dev_warn(dev, "unable to find I2C bus speed from ACPI\n");
 +		return 0;
 +	}
 +
 +	return lookup.min_speed != UINT_MAX ? lookup.min_speed : 0;
 +}
 +EXPORT_SYMBOL_GPL(i2c_acpi_find_bus_speed);
 +
++static int i2c_acpi_match_adapter(struct device *dev, void *data)
+ {
+ 	struct i2c_adapter *adapter = i2c_verify_adapter(dev);
+ 
+ 	if (!adapter)
+ 		return 0;
+ 
+ 	return ACPI_HANDLE(dev) == (acpi_handle)data;
+ }
+ 
 -static int acpi_i2c_match_device(struct device *dev, void *data)
++static int i2c_acpi_match_device(struct device *dev, void *data)
+ {
+ 	return ACPI_COMPANION(dev) == data;
+ }
+ 
 -static struct i2c_adapter *acpi_i2c_find_adapter_by_handle(acpi_handle handle)
++static struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle)
+ {
+ 	struct device *dev;
+ 
+ 	dev = bus_find_device(&i2c_bus_type, NULL, handle,
 -			      acpi_i2c_match_adapter);
++			      i2c_acpi_match_adapter);
+ 	return dev ? i2c_verify_adapter(dev) : NULL;
+ }
+ 
 -static struct i2c_client *acpi_i2c_find_client_by_adev(struct acpi_device *adev)
++static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev)
+ {
+ 	struct device *dev;
+ 
 -	dev = bus_find_device(&i2c_bus_type, NULL, adev, acpi_i2c_match_device);
++	dev = bus_find_device(&i2c_bus_type, NULL, adev, i2c_acpi_match_device);
+ 	return dev ? i2c_verify_client(dev) : NULL;
+ }
+ 
 -static int acpi_i2c_notify(struct notifier_block *nb, unsigned long value,
++static int i2c_acpi_notify(struct notifier_block *nb, unsigned long value,
+ 			   void *arg)
+ {
+ 	struct acpi_device *adev = arg;
+ 	struct i2c_board_info info;
+ 	acpi_handle adapter_handle;
+ 	struct i2c_adapter *adapter;
+ 	struct i2c_client *client;
+ 
+ 	switch (value) {
+ 	case ACPI_RECONFIG_DEVICE_ADD:
 -		if (acpi_i2c_get_info(adev, &info, &adapter_handle))
++		if (i2c_acpi_get_info(adev, &info, &adapter_handle))
+ 			break;
+ 
 -		adapter = acpi_i2c_find_adapter_by_handle(adapter_handle);
++		adapter = i2c_acpi_find_adapter_by_handle(adapter_handle);
+ 		if (!adapter)
+ 			break;
+ 
 -		acpi_i2c_register_device(adapter, adev, &info);
++		i2c_acpi_register_device(adapter, adev, &info);
+ 		break;
+ 	case ACPI_RECONFIG_DEVICE_REMOVE:
+ 		if (!acpi_device_enumerated(adev))
+ 			break;
+ 
 -		client = acpi_i2c_find_client_by_adev(adev);
++		client = i2c_acpi_find_client_by_adev(adev);
+ 		if (!client)
+ 			break;
+ 
+ 		i2c_unregister_device(client);
+ 		put_device(&client->dev);
+ 		break;
+ 	}
+ 
+ 	return NOTIFY_OK;
+ }
+ 
+ static struct notifier_block i2c_acpi_notifier = {
 -	.notifier_call = acpi_i2c_notify,
++	.notifier_call = i2c_acpi_notify,
+ };
  #else /* CONFIG_ACPI */
 -static inline void acpi_i2c_register_devices(struct i2c_adapter *adap) { }
 +static inline void i2c_acpi_register_devices(struct i2c_adapter *adap) { }
+ extern struct notifier_block i2c_acpi_notifier;
  #endif /* CONFIG_ACPI */
  
  #ifdef CONFIG_ACPI_I2C_OPREGION

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-07-15  2:17 linux-next: manual merge of the pm tree with the i2c tree Stephen Rothwell
@ 2016-07-15  2:28 ` Stephen Rothwell
  2016-07-15 12:19   ` Rafael J. Wysocki
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2016-07-15  2:28 UTC (permalink / raw)
  To: Rafael J. Wysocki, Wolfram Sang
  Cc: linux-next, linux-kernel, Octavian Purdila, Jarkko Nikula,
	Andy Shevchenko, Mika Westerberg

Hi all,

On Fri, 15 Jul 2016 12:17:23 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> I fixed it up (I think, but it needs more work - see below) and can

For a start, it generates this warning, now:

drivers/i2c/i2c-core.c:269:20: warning: 'i2c_acpi_add_device' defined but not used [-Wunused-function]
static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
                   ^

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-07-15  2:28 ` Stephen Rothwell
@ 2016-07-15 12:19   ` Rafael J. Wysocki
  2016-07-15 12:32     ` Wolfram Sang
  0 siblings, 1 reply; 22+ messages in thread
From: Rafael J. Wysocki @ 2016-07-15 12:19 UTC (permalink / raw)
  To: Stephen Rothwell, Wolfram Sang
  Cc: linux-next, linux-kernel, Octavian Purdila, Jarkko Nikula,
	Andy Shevchenko, Mika Westerberg

On Friday, July 15, 2016 12:28:53 PM Stephen Rothwell wrote:
> Hi all,
> 
> On Fri, 15 Jul 2016 12:17:23 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > I fixed it up (I think, but it needs more work - see below) and can
> 
> For a start, it generates this warning, now:
> 
> drivers/i2c/i2c-core.c:269:20: warning: 'i2c_acpi_add_device' defined but not used [-Wunused-function]
> static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
>                    ^

OK, thanks for the heads-up.

Wolfram, what about if I exposed my "acpi-tables" branch for you to pull?

You could resolve this in your tree then.

Thanks,
Rafael

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-07-15 12:19   ` Rafael J. Wysocki
@ 2016-07-15 12:32     ` Wolfram Sang
  2016-07-15 12:40       ` Rafael J. Wysocki
  2016-07-15 12:59       ` Rafael J. Wysocki
  0 siblings, 2 replies; 22+ messages in thread
From: Wolfram Sang @ 2016-07-15 12:32 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephen Rothwell, linux-next, linux-kernel, Octavian Purdila,
	Jarkko Nikula, Andy Shevchenko, Mika Westerberg

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

On Fri, Jul 15, 2016 at 02:19:28PM +0200, Rafael J. Wysocki wrote:
> On Friday, July 15, 2016 12:28:53 PM Stephen Rothwell wrote:
> > Hi all,
> > 
> > On Fri, 15 Jul 2016 12:17:23 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > I fixed it up (I think, but it needs more work - see below) and can
> > 
> > For a start, it generates this warning, now:
> > 
> > drivers/i2c/i2c-core.c:269:20: warning: 'i2c_acpi_add_device' defined but not used [-Wunused-function]
> > static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
> >                    ^
> 
> OK, thanks for the heads-up.

Yes, thanks!

> 
> Wolfram, what about if I exposed my "acpi-tables" branch for you to pull?
> 
> You could resolve this in your tree then.

I can pull it in, sure. For the fixup, I'd like a commitment from one of
the ACPI experts (Jarkko, Mika, Andy), though. Otherwise I'd need to
revert given that we are quite late in the cycle already.


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

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-07-15 12:32     ` Wolfram Sang
@ 2016-07-15 12:40       ` Rafael J. Wysocki
  2016-07-15 12:59       ` Rafael J. Wysocki
  1 sibling, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2016-07-15 12:40 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Stephen Rothwell, linux-next, linux-kernel, Octavian Purdila,
	Jarkko Nikula, Andy Shevchenko, Mika Westerberg

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

On Friday, July 15, 2016 09:32:54 PM Wolfram Sang wrote:
> On Fri, Jul 15, 2016 at 02:19:28PM +0200, Rafael J. Wysocki wrote:
> > On Friday, July 15, 2016 12:28:53 PM Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > On Fri, 15 Jul 2016 12:17:23 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > I fixed it up (I think, but it needs more work - see below) and can
> > > 
> > > For a start, it generates this warning, now:
> > > 
> > > drivers/i2c/i2c-core.c:269:20: warning: 'i2c_acpi_add_device' defined but not used [-Wunused-function]
> > > static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
> > >                    ^
> > 
> > OK, thanks for the heads-up.
> 
> Yes, thanks!
> 
> > 
> > Wolfram, what about if I exposed my "acpi-tables" branch for you to pull?
> > 
> > You could resolve this in your tree then.
> 
> I can pull it in, sure. For the fixup, I'd like a commitment from one of
> the ACPI experts (Jarkko, Mika, Andy), though. Otherwise I'd need to
> revert given that we are quite late in the cycle already.

Well, I can help with that too, I suppose.

Thanks,
Rafael

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-07-15 12:32     ` Wolfram Sang
  2016-07-15 12:40       ` Rafael J. Wysocki
@ 2016-07-15 12:59       ` Rafael J. Wysocki
  2016-07-17 18:14         ` Wolfram Sang
  1 sibling, 1 reply; 22+ messages in thread
From: Rafael J. Wysocki @ 2016-07-15 12:59 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Stephen Rothwell, linux-next, linux-kernel, Octavian Purdila,
	Jarkko Nikula, Andy Shevchenko, Mika Westerberg

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

On Friday, July 15, 2016 09:32:54 PM Wolfram Sang wrote:
> On Fri, Jul 15, 2016 at 02:19:28PM +0200, Rafael J. Wysocki wrote:
> > On Friday, July 15, 2016 12:28:53 PM Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > On Fri, 15 Jul 2016 12:17:23 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > >
> > > > I fixed it up (I think, but it needs more work - see below) and can
> > > 
> > > For a start, it generates this warning, now:
> > > 
> > > drivers/i2c/i2c-core.c:269:20: warning: 'i2c_acpi_add_device' defined but not used [-Wunused-function]
> > > static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
> > >                    ^
> > 
> > OK, thanks for the heads-up.
> 
> Yes, thanks!
> 
> > 
> > Wolfram, what about if I exposed my "acpi-tables" branch for you to pull?
> > 
> > You could resolve this in your tree then.
> 
> I can pull it in, sure. For the fixup, I'd like a commitment from one of
> the ACPI experts (Jarkko, Mika, Andy), though. Otherwise I'd need to
> revert given that we are quite late in the cycle already.

The branch is here:

 git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpi-tables

The top-most commit is:

fafe5306f201 ACPI: Rename configfs.c to acpi_configfs.c to prevent link error

I won't rebase this branch going forward, so it is safe to pull.

Please let me know how I can help with the conflict resolution.

Thanks,
Rafael

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-07-15 12:59       ` Rafael J. Wysocki
@ 2016-07-17 18:14         ` Wolfram Sang
  2016-07-19  2:41           ` Rafael J. Wysocki
  0 siblings, 1 reply; 22+ messages in thread
From: Wolfram Sang @ 2016-07-17 18:14 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephen Rothwell, linux-next, linux-kernel, Octavian Purdila,
	Jarkko Nikula, Andy Shevchenko, Mika Westerberg

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


> > > > > I fixed it up (I think, but it needs more work - see below) and can
> > > > 
> > > > For a start, it generates this warning, now:
> > > > 
> > > > drivers/i2c/i2c-core.c:269:20: warning: 'i2c_acpi_add_device' defined but not used [-Wunused-function]
> > > > static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
> > > >                    ^
> > > 
> > > OK, thanks for the heads-up.
> > 
> > Yes, thanks!
> > 
> > > 
> > > Wolfram, what about if I exposed my "acpi-tables" branch for you to pull?
> > > 
> > > You could resolve this in your tree then.
> > 
> > I can pull it in, sure. For the fixup, I'd like a commitment from one of
> > the ACPI experts (Jarkko, Mika, Andy), though. Otherwise I'd need to
> > revert given that we are quite late in the cycle already.
> 
> The branch is here:
> 
>  git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpi-tables
> 
> The top-most commit is:
> 
> fafe5306f201 ACPI: Rename configfs.c to acpi_configfs.c to prevent link error
> 
> I won't rebase this branch going forward, so it is safe to pull.
> 
> Please let me know how I can help with the conflict resolution.

Well, not knowing much about ACPI, I just need the conflict resolution
for my latest i2c/for-next and your above branch. If you want to do it,
fine with me. But maybe Jarkko will be back to office on Monday, too.


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

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-07-17 18:14         ` Wolfram Sang
@ 2016-07-19  2:41           ` Rafael J. Wysocki
  2016-07-19  3:48             ` Wolfram Sang
  0 siblings, 1 reply; 22+ messages in thread
From: Rafael J. Wysocki @ 2016-07-19  2:41 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Stephen Rothwell, linux-next, linux-kernel, Octavian Purdila,
	Jarkko Nikula, Andy Shevchenko, Mika Westerberg

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

On Sunday, July 17, 2016 08:14:48 PM Wolfram Sang wrote:
> 
> > > > > > I fixed it up (I think, but it needs more work - see below) and can
> > > > > 
> > > > > For a start, it generates this warning, now:
> > > > > 
> > > > > drivers/i2c/i2c-core.c:269:20: warning: 'i2c_acpi_add_device' defined but not used [-Wunused-function]
> > > > > static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
> > > > >                    ^
> > > > 
> > > > OK, thanks for the heads-up.
> > > 
> > > Yes, thanks!
> > > 
> > > > 
> > > > Wolfram, what about if I exposed my "acpi-tables" branch for you to pull?
> > > > 
> > > > You could resolve this in your tree then.
> > > 
> > > I can pull it in, sure. For the fixup, I'd like a commitment from one of
> > > the ACPI experts (Jarkko, Mika, Andy), though. Otherwise I'd need to
> > > revert given that we are quite late in the cycle already.
> > 
> > The branch is here:
> > 
> >  git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git acpi-tables
> > 
> > The top-most commit is:
> > 
> > fafe5306f201 ACPI: Rename configfs.c to acpi_configfs.c to prevent link error
> > 
> > I won't rebase this branch going forward, so it is safe to pull.
> > 
> > Please let me know how I can help with the conflict resolution.
> 
> Well, not knowing much about ACPI, I just need the conflict resolution
> for my latest i2c/for-next and your above branch. If you want to do it,
> fine with me. But maybe Jarkko will be back to office on Monday, too.

Unfortunately, I don't see how these branches can be merged in a sensible
way without adding too much new code into the merge itself.

Something needs to be dropped and then rebased and applied again.

Thanks,
Rafael

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-07-19  2:41           ` Rafael J. Wysocki
@ 2016-07-19  3:48             ` Wolfram Sang
  2016-07-19 12:55               ` Rafael J. Wysocki
  2016-07-25 12:03               ` Andy Shevchenko
  0 siblings, 2 replies; 22+ messages in thread
From: Wolfram Sang @ 2016-07-19  3:48 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephen Rothwell, linux-next, linux-kernel, Octavian Purdila,
	Jarkko Nikula, Andy Shevchenko, Mika Westerberg

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


> > Well, not knowing much about ACPI, I just need the conflict resolution
> > for my latest i2c/for-next and your above branch. If you want to do it,
> > fine with me. But maybe Jarkko will be back to office on Monday, too.
> 
> Unfortunately, I don't see how these branches can be merged in a sensible
> way without adding too much new code into the merge itself.
> 
> Something needs to be dropped and then rebased and applied again.

Okay, I'll drop the I2C parts. Next to the core parts which I will drop,
there was also a driver patch making use of the core changes for which I
requested some updates. Since those did not happen yet (Jarkko on
holiday?), the core patches alone are not important anyhow.

Thanks for looking into it!

   Wolfram


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

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-07-19  3:48             ` Wolfram Sang
@ 2016-07-19 12:55               ` Rafael J. Wysocki
  2016-07-25 12:03               ` Andy Shevchenko
  1 sibling, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2016-07-19 12:55 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Stephen Rothwell, linux-next, linux-kernel, Octavian Purdila,
	Jarkko Nikula, Andy Shevchenko, Mika Westerberg

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

On Tuesday, July 19, 2016 05:48:07 AM Wolfram Sang wrote:
> 
> > > Well, not knowing much about ACPI, I just need the conflict resolution
> > > for my latest i2c/for-next and your above branch. If you want to do it,
> > > fine with me. But maybe Jarkko will be back to office on Monday, too.
> > 
> > Unfortunately, I don't see how these branches can be merged in a sensible
> > way without adding too much new code into the merge itself.
> > 
> > Something needs to be dropped and then rebased and applied again.
> 
> Okay, I'll drop the I2C parts. Next to the core parts which I will drop,
> there was also a driver patch making use of the core changes for which I
> requested some updates. Since those did not happen yet (Jarkko on
> holiday?), the core patches alone are not important anyhow.

Thanks a lot!

> Thanks for looking into it!

No problem.

Thanks,
Rafael

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-07-19  3:48             ` Wolfram Sang
  2016-07-19 12:55               ` Rafael J. Wysocki
@ 2016-07-25 12:03               ` Andy Shevchenko
  1 sibling, 0 replies; 22+ messages in thread
From: Andy Shevchenko @ 2016-07-25 12:03 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Rafael J. Wysocki, Stephen Rothwell, linux-next, linux-kernel,
	Octavian Purdila, Jarkko Nikula, Andy Shevchenko,
	Mika Westerberg

On Tue, Jul 19, 2016 at 6:48 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
>
>> > Well, not knowing much about ACPI, I just need the conflict resolution
>> > for my latest i2c/for-next and your above branch. If you want to do it,
>> > fine with me. But maybe Jarkko will be back to office on Monday, too.
>>
>> Unfortunately, I don't see how these branches can be merged in a sensible
>> way without adding too much new code into the merge itself.
>>
>> Something needs to be dropped and then rebased and applied again.
>
> Okay, I'll drop the I2C parts. Next to the core parts which I will drop,
> there was also a driver patch making use of the core changes for which I
> requested some updates. Since those did not happen yet (Jarkko on
> holiday?), the core patches alone are not important anyhow.

Jarkko and Mika are on holidays, I recently noticed this thread,
sorry. For now your solution seems okay, since we can't push broken
parts into v4.8-rc1.

-- 
With Best Regards,
Andy Shevchenko

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2022-10-05  0:18 ` Stephen Rothwell
@ 2022-10-05  7:12   ` Uwe Kleine-König
  0 siblings, 0 replies; 22+ messages in thread
From: Uwe Kleine-König @ 2022-10-05  7:12 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Wolfram Sang, broonie, Rafael J . Wysocki, Daniel Scally,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Rafael J . Wysocki

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

On Wed, Oct 05, 2022 at 11:18:36AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> On Thu, 29 Sep 2022 13:18:53 +0100 broonie@kernel.org wrote:
> >
> > Today's linux-next merge of the pm tree got a conflict in:
> > 
> >   drivers/platform/x86/intel/int3472/tps68470.c
> > 
> > between commit:
> > 
> >   ed5c2f5fd10dd ("i2c: Make remove callback return void")
> > 
> > from the i2c tree and commit:
> > 
> >   06a659d1f0a0a ("platform/x86: int3472: Support multiple gpio lookups in board data")
> > 
> > from the pm tree.
> > 
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging.  You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> > 
> > diff --cc drivers/platform/x86/intel/int3472/tps68470.c
> > index 5dd81bb05255b,49fc379fe680a..0000000000000
> > --- a/drivers/platform/x86/intel/int3472/tps68470.c
> > +++ b/drivers/platform/x86/intel/int3472/tps68470.c
> > @@@ -178,13 -227,18 +227,16 @@@ static int skl_int3472_tps68470_probe(s
> >   	return ret;
> >   }
> >   
> >  -static int skl_int3472_tps68470_remove(struct i2c_client *client)
> >  +static void skl_int3472_tps68470_remove(struct i2c_client *client)
> >   {
> >   	const struct int3472_tps68470_board_data *board_data;
> > + 	int i;
> >   
> >   	board_data = int3472_tps68470_get_board_data(dev_name(&client->dev));
> > - 	if (board_data)
> > - 		gpiod_remove_lookup_table(board_data->tps68470_gpio_lookup_table);
> > + 	if (board_data) {
> > + 		for (i = 0; i < board_data->n_gpiod_lookups; i++)
> > + 			gpiod_remove_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
> > + 	}
> >  -
> >  -	return 0;
> >   }
> >   
> >   static const struct acpi_device_id int3472_device_id[] = {
> 
> This is now a conflict between the i2c tree and Linus' tree.

In the meantime the i2c tree is pulled, too and Linus solved the
conflict in the same way in b86406d42ae3c41ae0ce332ea24350829b88af51.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

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

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2022-09-29 12:18 broonie
@ 2022-10-05  0:18 ` Stephen Rothwell
  2022-10-05  7:12   ` Uwe Kleine-König
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2022-10-05  0:18 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: broonie, Rafael J . Wysocki, Daniel Scally,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Rafael J . Wysocki, Uwe Kleine-König

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

Hi all,

On Thu, 29 Sep 2022 13:18:53 +0100 broonie@kernel.org wrote:
>
> Today's linux-next merge of the pm tree got a conflict in:
> 
>   drivers/platform/x86/intel/int3472/tps68470.c
> 
> between commit:
> 
>   ed5c2f5fd10dd ("i2c: Make remove callback return void")
> 
> from the i2c tree and commit:
> 
>   06a659d1f0a0a ("platform/x86: int3472: Support multiple gpio lookups in board data")
> 
> from the pm tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> diff --cc drivers/platform/x86/intel/int3472/tps68470.c
> index 5dd81bb05255b,49fc379fe680a..0000000000000
> --- a/drivers/platform/x86/intel/int3472/tps68470.c
> +++ b/drivers/platform/x86/intel/int3472/tps68470.c
> @@@ -178,13 -227,18 +227,16 @@@ static int skl_int3472_tps68470_probe(s
>   	return ret;
>   }
>   
>  -static int skl_int3472_tps68470_remove(struct i2c_client *client)
>  +static void skl_int3472_tps68470_remove(struct i2c_client *client)
>   {
>   	const struct int3472_tps68470_board_data *board_data;
> + 	int i;
>   
>   	board_data = int3472_tps68470_get_board_data(dev_name(&client->dev));
> - 	if (board_data)
> - 		gpiod_remove_lookup_table(board_data->tps68470_gpio_lookup_table);
> + 	if (board_data) {
> + 		for (i = 0; i < board_data->n_gpiod_lookups; i++)
> + 			gpiod_remove_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
> + 	}
>  -
>  -	return 0;
>   }
>   
>   static const struct acpi_device_id int3472_device_id[] = {

This is now a conflict between the i2c tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* linux-next: manual merge of the pm tree with the i2c tree
@ 2022-09-29 12:18 broonie
  2022-10-05  0:18 ` Stephen Rothwell
  0 siblings, 1 reply; 22+ messages in thread
From: broonie @ 2022-09-29 12:18 UTC (permalink / raw)
  To: Rafael J . Wysocki
  Cc: Daniel Scally, Linux Kernel Mailing List,
	Linux Next Mailing List, Rafael J . Wysocki,
	Uwe Kleine-König, Wolfram Sang

Hi all,

Today's linux-next merge of the pm tree got a conflict in:

  drivers/platform/x86/intel/int3472/tps68470.c

between commit:

  ed5c2f5fd10dd ("i2c: Make remove callback return void")

from the i2c tree and commit:

  06a659d1f0a0a ("platform/x86: int3472: Support multiple gpio lookups in board data")

from the pm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc drivers/platform/x86/intel/int3472/tps68470.c
index 5dd81bb05255b,49fc379fe680a..0000000000000
--- a/drivers/platform/x86/intel/int3472/tps68470.c
+++ b/drivers/platform/x86/intel/int3472/tps68470.c
@@@ -178,13 -227,18 +227,16 @@@ static int skl_int3472_tps68470_probe(s
  	return ret;
  }
  
 -static int skl_int3472_tps68470_remove(struct i2c_client *client)
 +static void skl_int3472_tps68470_remove(struct i2c_client *client)
  {
  	const struct int3472_tps68470_board_data *board_data;
+ 	int i;
  
  	board_data = int3472_tps68470_get_board_data(dev_name(&client->dev));
- 	if (board_data)
- 		gpiod_remove_lookup_table(board_data->tps68470_gpio_lookup_table);
+ 	if (board_data) {
+ 		for (i = 0; i < board_data->n_gpiod_lookups; i++)
+ 			gpiod_remove_lookup_table(board_data->tps68470_gpio_lookup_tables[i]);
+ 	}
 -
 -	return 0;
  }
  
  static const struct acpi_device_id int3472_device_id[] = {

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

* linux-next: manual merge of the pm tree with the i2c tree
@ 2022-02-07 23:11 Stephen Rothwell
  0 siblings, 0 replies; 22+ messages in thread
From: Stephen Rothwell @ 2022-02-07 23:11 UTC (permalink / raw)
  To: Rafael J. Wysocki, Wolfram Sang
  Cc: Akhil R, Andy Shevchenko, Linux Kernel Mailing List,
	Linux Next Mailing List, Rafael J. Wysocki

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

Hi all,

Today's linux-next merge of the pm tree got a conflict in:

  drivers/base/property.c

between commit:

  ca0acb511c21 ("device property: Add fwnode_irq_get_byname")

from the i2c tree and commit:

  ffa743d3f33b ("device property: Don't split fwnode_get_irq*() APIs in the code")

from the pm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/base/property.c
index fc59e0f7f9cc,ad97d23ddbe6..000000000000
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@@ -919,51 -935,6 +935,35 @@@ int fwnode_irq_get(const struct fwnode_
  }
  EXPORT_SYMBOL(fwnode_irq_get);
  
- /**
-  * fwnode_iomap - Maps the memory mapped IO for a given fwnode
-  * @fwnode:	Pointer to the firmware node
-  * @index:	Index of the IO range
-  *
-  * Returns a pointer to the mapped memory.
-  */
- void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index)
- {
- 	if (IS_ENABLED(CONFIG_OF_ADDRESS) && is_of_node(fwnode))
- 		return of_iomap(to_of_node(fwnode), index);
- 
- 	return NULL;
- }
- EXPORT_SYMBOL(fwnode_iomap);
- 
 +/**
 + * fwnode_irq_get_byname - Get IRQ from a fwnode using its name
 + * @fwnode:	Pointer to the firmware node
 + * @name:	IRQ name
 + *
 + * Description:
 + * Find a match to the string @name in the 'interrupt-names' string array
 + * in _DSD for ACPI, or of_node for Device Tree. Then get the Linux IRQ
 + * number of the IRQ resource corresponding to the index of the matched
 + * string.
 + *
 + * Return:
 + * Linux IRQ number on success, or negative errno otherwise.
 + */
 +int fwnode_irq_get_byname(const struct fwnode_handle *fwnode, const char *name)
 +{
 +	int index;
 +
 +	if (!name)
 +		return -EINVAL;
 +
 +	index = fwnode_property_match_string(fwnode, "interrupt-names",  name);
 +	if (index < 0)
 +		return index;
 +
 +	return fwnode_irq_get(fwnode, index);
 +}
 +EXPORT_SYMBOL(fwnode_irq_get_byname);
 +
  /**
   * fwnode_graph_get_next_endpoint - Get next endpoint firmware node
   * @fwnode: Pointer to the parent firmware node

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2018-10-29  2:09 Stephen Rothwell
@ 2018-10-30  7:32 ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2018-10-30  7:32 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Wolfram Sang, Linux-Next Mailing List, Linux Kernel Mailing List,
	Hans de Goede

On Monday, October 29, 2018 3:09:25 AM CET Stephen Rothwell wrote:
> 
> --Sig_/Yi5UDAd5LU=QdOHo+ui7Syk
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: quoted-printable
> 
> Hi Rafael,
> 
> Today's linux-next merge of the pm tree got conflicts in:
> 
>   drivers/i2c/busses/i2c-designware-baytrail.c
>   drivers/i2c/busses/i2c-designware-core.h
> 
> between commit:
> 
>   9cbeeca05049 ("i2c: designware: Remove Cherry Trail PMIC I2C bus pm_disab=
> led workaround")
> 
> from the i2c tree and commit:
> 
>   8afb46804dfa ("i2c: designware: Cleanup bus lock handling")
> 
> from the pm tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> --=20
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/i2c/busses/i2c-designware-baytrail.c
> index 9ca1feaba98f,971b5cde7a93..000000000000
> --- a/drivers/i2c/busses/i2c-designware-baytrail.c
> +++ b/drivers/i2c/busses/i2c-designware-baytrail.c
> @@@ -162,18 -36,9 +36,9 @@@ int i2c_dw_probe_lock_support(struct dw
>   		return -EPROBE_DEFER;
>  =20
>   	dev_info(dev->dev, "I2C bus managed by PUNIT\n");
> - 	dev->acquire_lock =3D baytrail_i2c_acquire;
> - 	dev->release_lock =3D baytrail_i2c_release;
> + 	dev->acquire_lock =3D iosf_mbi_block_punit_i2c_access;
> + 	dev->release_lock =3D iosf_mbi_unblock_punit_i2c_access;
>  -	dev->pm_disabled =3D true;
>  +	dev->shared_with_punit =3D true;
>  =20
> - 	pm_qos_add_request(&dev->pm_qos, PM_QOS_CPU_DMA_LATENCY,
> - 			   PM_QOS_DEFAULT_VALUE);
> -=20
>   	return 0;
>   }
> -=20
> - void i2c_dw_remove_lock_support(struct dw_i2c_dev *dev)
> - {
> - 	if (dev->acquire_lock)
> - 		pm_qos_remove_request(&dev->pm_qos);
> - }
> diff --cc drivers/i2c/busses/i2c-designware-core.h
> index 9ec8394f4787,152bf56d8404..000000000000
> --- a/drivers/i2c/busses/i2c-designware-core.h
> +++ b/drivers/i2c/busses/i2c-designware-core.h
> @@@ -209,10 -208,9 +208,9 @@@
>    * @fp_lcnt: fast plus LCNT value
>    * @hs_hcnt: high speed HCNT value
>    * @hs_lcnt: high speed LCNT value
> -  * @pm_qos: pm_qos_request used while holding a hardware lock on the bus
>    * @acquire_lock: function to acquire a hardware lock on the bus
>    * @release_lock: function to release a hardware lock on the bus
>  - * @pm_disabled: true if power-management should be disabled for this i2c=
> -bus
>  + * @shared_with_punit: true if this bus is shared with the SoCs PUNIT
>    * @disable: function to disable the controller
>    * @disable_int: function to disable all interrupts
>    * @init: function to initialize the I2C hardware
> @@@ -263,10 -260,9 +261,9 @@@ struct dw_i2c_dev=20
>   	u16			fp_lcnt;
>   	u16			hs_hcnt;
>   	u16			hs_lcnt;
> - 	struct pm_qos_request	pm_qos;
> - 	int			(*acquire_lock)(struct dw_i2c_dev *dev);
> - 	void			(*release_lock)(struct dw_i2c_dev *dev);
> + 	int			(*acquire_lock)(void);
> + 	void			(*release_lock)(void);
>  -	bool			pm_disabled;
>  +	bool			shared_with_punit;
>   	void			(*disable)(struct dw_i2c_dev *dev);
>   	void			(*disable_int)(struct dw_i2c_dev *dev);
>   	int			(*init)(struct dw_i2c_dev *dev);
> 
> --Sig_/Yi5UDAd5LU=QdOHo+ui7Syk
> Content-Type: application/pgp-signature
> Content-Description: OpenPGP digital signature
> 
> 
> --Sig_/Yi5UDAd5LU=QdOHo+ui7Syk--
> 

The fix looks good to me, thanks!

Cheers,
Rafael



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

* linux-next: manual merge of the pm tree with the i2c tree
@ 2018-10-29  2:09 Stephen Rothwell
  2018-10-30  7:32 ` Rafael J. Wysocki
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2018-10-29  2:09 UTC (permalink / raw)
  To: Rafael J. Wysocki, Wolfram Sang
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Hans de Goede

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

Hi Rafael,

Today's linux-next merge of the pm tree got conflicts in:

  drivers/i2c/busses/i2c-designware-baytrail.c
  drivers/i2c/busses/i2c-designware-core.h

between commit:

  9cbeeca05049 ("i2c: designware: Remove Cherry Trail PMIC I2C bus pm_disabled workaround")

from the i2c tree and commit:

  8afb46804dfa ("i2c: designware: Cleanup bus lock handling")

from the pm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/i2c/busses/i2c-designware-baytrail.c
index 9ca1feaba98f,971b5cde7a93..000000000000
--- a/drivers/i2c/busses/i2c-designware-baytrail.c
+++ b/drivers/i2c/busses/i2c-designware-baytrail.c
@@@ -162,18 -36,9 +36,9 @@@ int i2c_dw_probe_lock_support(struct dw
  		return -EPROBE_DEFER;
  
  	dev_info(dev->dev, "I2C bus managed by PUNIT\n");
- 	dev->acquire_lock = baytrail_i2c_acquire;
- 	dev->release_lock = baytrail_i2c_release;
+ 	dev->acquire_lock = iosf_mbi_block_punit_i2c_access;
+ 	dev->release_lock = iosf_mbi_unblock_punit_i2c_access;
 -	dev->pm_disabled = true;
 +	dev->shared_with_punit = true;
  
- 	pm_qos_add_request(&dev->pm_qos, PM_QOS_CPU_DMA_LATENCY,
- 			   PM_QOS_DEFAULT_VALUE);
- 
  	return 0;
  }
- 
- void i2c_dw_remove_lock_support(struct dw_i2c_dev *dev)
- {
- 	if (dev->acquire_lock)
- 		pm_qos_remove_request(&dev->pm_qos);
- }
diff --cc drivers/i2c/busses/i2c-designware-core.h
index 9ec8394f4787,152bf56d8404..000000000000
--- a/drivers/i2c/busses/i2c-designware-core.h
+++ b/drivers/i2c/busses/i2c-designware-core.h
@@@ -209,10 -208,9 +208,9 @@@
   * @fp_lcnt: fast plus LCNT value
   * @hs_hcnt: high speed HCNT value
   * @hs_lcnt: high speed LCNT value
-  * @pm_qos: pm_qos_request used while holding a hardware lock on the bus
   * @acquire_lock: function to acquire a hardware lock on the bus
   * @release_lock: function to release a hardware lock on the bus
 - * @pm_disabled: true if power-management should be disabled for this i2c-bus
 + * @shared_with_punit: true if this bus is shared with the SoCs PUNIT
   * @disable: function to disable the controller
   * @disable_int: function to disable all interrupts
   * @init: function to initialize the I2C hardware
@@@ -263,10 -260,9 +261,9 @@@ struct dw_i2c_dev 
  	u16			fp_lcnt;
  	u16			hs_hcnt;
  	u16			hs_lcnt;
- 	struct pm_qos_request	pm_qos;
- 	int			(*acquire_lock)(struct dw_i2c_dev *dev);
- 	void			(*release_lock)(struct dw_i2c_dev *dev);
+ 	int			(*acquire_lock)(void);
+ 	void			(*release_lock)(void);
 -	bool			pm_disabled;
 +	bool			shared_with_punit;
  	void			(*disable)(struct dw_i2c_dev *dev);
  	void			(*disable_int)(struct dw_i2c_dev *dev);
  	int			(*init)(struct dw_i2c_dev *dev);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2018-01-11 23:27 Stephen Rothwell
@ 2018-01-12 12:44 ` Rafael J. Wysocki
  0 siblings, 0 replies; 22+ messages in thread
From: Rafael J. Wysocki @ 2018-01-12 12:44 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Wolfram Sang, Linux-Next Mailing List, Linux Kernel Mailing List,
	Phil Reid

On Friday, January 12, 2018 12:27:29 AM CET Stephen Rothwell wrote:
> Hi Rafael,
> 
> Today's linux-next merge of the pm tree got a conflict in:
> 
>   drivers/i2c/busses/i2c-designware-platdrv.c
> 
> between commit:
> 
>   0326f9f801b2 ("i2c: designware: rename i2c_dw_plat_prepare_clk to i2c_dw_prepare_clk")
> 
> from the i2c tree and commit:
> 
>   02e45646d53b ("PM: i2c-designware-platdrv: Optimize power management")
> 
> from the pm tree.
> 
> I fixed it up (see below) and can carry the fix as necessary.

The fix looks good to me.

Thanks!

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

* linux-next: manual merge of the pm tree with the i2c tree
@ 2018-01-11 23:27 Stephen Rothwell
  2018-01-12 12:44 ` Rafael J. Wysocki
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2018-01-11 23:27 UTC (permalink / raw)
  To: Rafael J. Wysocki, Wolfram Sang
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Phil Reid

Hi Rafael,

Today's linux-next merge of the pm tree got a conflict in:

  drivers/i2c/busses/i2c-designware-platdrv.c

between commit:

  0326f9f801b2 ("i2c: designware: rename i2c_dw_plat_prepare_clk to i2c_dw_prepare_clk")

from the i2c tree and commit:

  02e45646d53b ("PM: i2c-designware-platdrv: Optimize power management")

from the pm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/i2c/busses/i2c-designware-platdrv.c
index 6e0fd94faba1,153b947702c5..000000000000
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@@ -430,16 -471,9 +448,9 @@@ static int dw_i2c_plat_suspend(struct d
  {
  	struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
  
- 	if (i_dev->suspended) {
- 		i_dev->skip_resume = true;
- 		return 0;
- 	}
- 
  	i_dev->disable(i_dev);
 -	i2c_dw_plat_prepare_clk(i_dev, false);
 +	i2c_dw_prepare_clk(i_dev, false);
  
- 	i_dev->suspended = true;
- 
  	return 0;
  }
  
@@@ -447,19 -481,9 +458,9 @@@ static int dw_i2c_plat_resume(struct de
  {
  	struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
  
- 	if (!i_dev->suspended)
- 		return 0;
- 
- 	if (i_dev->skip_resume) {
- 		i_dev->skip_resume = false;
- 		return 0;
- 	}
- 
 -	i2c_dw_plat_prepare_clk(i_dev, true);
 +	i2c_dw_prepare_clk(i_dev, true);
  	i_dev->init(i_dev);
  
- 	i_dev->suspended = false;
- 
  	return 0;
  }
  

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-01-06  2:15 ` Rafael J. Wysocki
@ 2016-01-06  8:20   ` Wolfram Sang
  0 siblings, 0 replies; 22+ messages in thread
From: Wolfram Sang @ 2016-01-06  8:20 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephen Rothwell, linux-next, linux-kernel,
	Suravee Suthikulpanit, Loc Ho

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


> > I fixed it up (see below) and can carry the fix as necessary (no action
> > is required).
> 
> Looks good to me and thanks for taking care of this!

Ditto. Thanks!


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: linux-next: manual merge of the pm tree with the i2c tree
  2016-01-06  1:39 Stephen Rothwell
@ 2016-01-06  2:15 ` Rafael J. Wysocki
  2016-01-06  8:20   ` Wolfram Sang
  0 siblings, 1 reply; 22+ messages in thread
From: Rafael J. Wysocki @ 2016-01-06  2:15 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Wolfram Sang, linux-next, linux-kernel, Suravee Suthikulpanit, Loc Ho

On Wednesday, January 06, 2016 12:39:11 PM Stephen Rothwell wrote:
> Hi Rafael,

Hi,

> Today's linux-next merge of the pm tree got a conflict in:
> 
>   drivers/i2c/busses/i2c-designware-platdrv.c
> 
> between commit:
> 
>   90708ce22b48 ("i2c: designware: Add support for AMD Seattle I2C")
> 
> from the i2c tree and commit:
> 
>   a90410e8ae3f ("i2c: dw: Add APM X-Gene ACPI I2C device support")
> 
> from the pm tree.
> 
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).

Looks good to me and thanks for taking care of this!

Rafael


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

* linux-next: manual merge of the pm tree with the i2c tree
@ 2016-01-06  1:39 Stephen Rothwell
  2016-01-06  2:15 ` Rafael J. Wysocki
  0 siblings, 1 reply; 22+ messages in thread
From: Stephen Rothwell @ 2016-01-06  1:39 UTC (permalink / raw)
  To: Rafael J. Wysocki, Wolfram Sang
  Cc: linux-next, linux-kernel, Suravee Suthikulpanit, Loc Ho

Hi Rafael,

Today's linux-next merge of the pm tree got a conflict in:

  drivers/i2c/busses/i2c-designware-platdrv.c

between commit:

  90708ce22b48 ("i2c: designware: Add support for AMD Seattle I2C")

from the i2c tree and commit:

  a90410e8ae3f ("i2c: dw: Add APM X-Gene ACPI I2C device support")

from the pm tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/i2c/busses/i2c-designware-platdrv.c
index 4f86d0795f7f,bf72ae740fc1..000000000000
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@@ -122,7 -123,7 +123,8 @@@ static const struct acpi_device_id dw_i
  	{ "80860F41", 0 },
  	{ "808622C1", 0 },
  	{ "AMD0010", ACCESS_INTR_MASK },
 +	{ "AMDI0510", 0 },
+ 	{ "APMC0D0F", 0 },
  	{ }
  };
  MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);

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

end of thread, other threads:[~2022-10-05  7:12 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-15  2:17 linux-next: manual merge of the pm tree with the i2c tree Stephen Rothwell
2016-07-15  2:28 ` Stephen Rothwell
2016-07-15 12:19   ` Rafael J. Wysocki
2016-07-15 12:32     ` Wolfram Sang
2016-07-15 12:40       ` Rafael J. Wysocki
2016-07-15 12:59       ` Rafael J. Wysocki
2016-07-17 18:14         ` Wolfram Sang
2016-07-19  2:41           ` Rafael J. Wysocki
2016-07-19  3:48             ` Wolfram Sang
2016-07-19 12:55               ` Rafael J. Wysocki
2016-07-25 12:03               ` Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2022-09-29 12:18 broonie
2022-10-05  0:18 ` Stephen Rothwell
2022-10-05  7:12   ` Uwe Kleine-König
2022-02-07 23:11 Stephen Rothwell
2018-10-29  2:09 Stephen Rothwell
2018-10-30  7:32 ` Rafael J. Wysocki
2018-01-11 23:27 Stephen Rothwell
2018-01-12 12:44 ` Rafael J. Wysocki
2016-01-06  1:39 Stephen Rothwell
2016-01-06  2:15 ` Rafael J. Wysocki
2016-01-06  8:20   ` Wolfram Sang

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.