Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 444699c8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c-i801: SMBus patch for Intel DH89xxCC DeviceIDs
  i2c: Drop i2c_adapter.id
  i2c: Deprecate i2c_driver.attach_adapter and .detach_adapter
  i2c-dev: Use standard bus notification mechanism
  i2c: Export i2c_for_each_dev
  i2c: Get rid of <linux/i2c-id.h>
  i2c: Minor fixes to upgrading-clients document
  i2c: make i2c_get_adapter prototype clearer
  i2c: Fix typo in instantiating-devices document
  i2c-boardinfo: Fix typo in comment
parents 6113f39d 662cda8a
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -585,16 +585,6 @@ Who: NeilBrown <neilb@suse.de>

----------------------------

What:	i2c_adapter.id
When:	June 2011
Why:	This field is deprecated. I2C device drivers shouldn't change their
	behavior based on the underlying I2C adapter. Instead, the I2C
	adapter driver should instantiate the I2C devices and provide the
	needed platform-specific information.
Who:	Jean Delvare <khali@linux-fr.org>

----------------------------

What:	cancel_rearming_delayed_work[queue]()
When:	2.6.39

@@ -645,3 +635,12 @@ Who: Florian Westphal <fw@strlen.de>
Files:	include/linux/netfilter_ipv4/ipt_addrtype.h

----------------------------

What:	i2c_driver.attach_adapter
	i2c_driver.detach_adapter
When:	September 2011
Why:	These legacy callbacks should no longer be used as i2c-core offers
	a variety of preferable alternative ways to instantiate I2C devices.
Who:	Jean Delvare <khali@linux-fr.org>

----------------------------
+2 −1
Original line number Diff line number Diff line
@@ -16,8 +16,9 @@ Supported adapters:
  * Intel EP80579 (Tolapai)
  * Intel 82801JI (ICH10)
  * Intel 5/3400 Series (PCH)
  * Intel Cougar Point (PCH)
  * Intel 6 Series (PCH)
  * Intel Patsburg (PCH)
  * Intel DH89xxCC (PCH)
   Datasheets: Publicly available at the Intel website

On Intel Patsburg and later chipsets, both the normal host SMBus controller
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
	(...)
	i2c_adap = i2c_get_adapter(2);
	memset(&i2c_info, 0, sizeof(struct i2c_board_info));
	strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE);
	strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE);
	isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
						   normal_i2c, NULL);
	i2c_put_adapter(i2c_adap);
+9 −9
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ static int example_attach(struct i2c_adapter *adap, int addr, int kind)
	return 0;
}

static int __devexit example_detach(struct i2c_client *client)
static int example_detach(struct i2c_client *client)
{
	struct example_state *state = i2c_get_clientdata(client);

@@ -81,7 +81,7 @@ static struct i2c_driver example_driver = {
		.name		= "example",
	},
	.attach_adapter = example_attach_adapter,
	.detach_client	= __devexit_p(example_detach),
	.detach_client	= example_detach,
	.suspend	= example_suspend,
	.resume		= example_resume,
};
@@ -93,7 +93,7 @@ Updating the client
The new style binding model will check against a list of supported
devices and their associated address supplied by the code registering
the busses. This means that the driver .attach_adapter and
.detach_adapter methods can be removed, along with the addr_data,
.detach_client methods can be removed, along with the addr_data,
as follows:

- static struct i2c_driver example_driver;
@@ -110,14 +110,14 @@ as follows:

 static struct i2c_driver example_driver = {
-	.attach_adapter = example_attach_adapter,
-	.detach_client	= __devexit_p(example_detach),
-	.detach_client	= example_detach,
 }

Add the probe and remove methods to the i2c_driver, as so:

 static struct i2c_driver example_driver = {
+	.probe		= example_probe,
+	.remove		= __devexit_p(example_remove),
+	.remove		= example_remove,
 }

Change the example_attach method to accept the new parameters
@@ -199,8 +199,8 @@ to delete the i2c_detach_client call. It is possible that you
can also remove the ret variable as it is not not needed for
any of the core functions.

- static int __devexit example_detach(struct i2c_client *client)
+ static int __devexit example_remove(struct i2c_client *client)
- static int example_detach(struct i2c_client *client)
+ static int example_remove(struct i2c_client *client)
{
	struct example_state *state = i2c_get_clientdata(client);

@@ -253,7 +253,7 @@ static int example_probe(struct i2c_client *client,
	return 0;
}

static int __devexit example_remove(struct i2c_client *client)
static int example_remove(struct i2c_client *client)
{
	struct example_state *state = i2c_get_clientdata(client);

@@ -275,7 +275,7 @@ static struct i2c_driver example_driver = {
	},
	.id_table	= example_idtable,
	.probe		= example_probe,
	.remove		= __devexit_p(example_remove),
	.remove		= example_remove,
	.suspend	= example_suspend,
	.resume		= example_resume,
};
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ Card number: 4

Note: No module for the mse3000 is available yet
Note: No module for the vpx3224 is available yet
Note: use encoder=X or decoder=X for non-default i2c chips (see i2c-id.h)
Note: use encoder=X or decoder=X for non-default i2c chips

===========================

Loading