testers wanted: isp1301_omap conversion to new-style i2c driver
Subsystems (5)
Hi all,
I have converted the isp1301_omap driver to a new-style i2c driver. The problem is that I don't have an OMAP system nor even an ARM compiler, so I cannot test my work at all. So, I would appreciate if someone with access to an OMAP system could test if the isp1301_omap driver still builds and works fine after applying the two attached patches.
Thanks,
Signature · 1 line
Jean Delvare
From: Felipe Balbi <[email protected]>
Subject: i2c/isp1301_omap: Convert to a new-style i2c driver, part 1
Based on David Brownell's patch for tps65010, this patch starts converting isp1301_omap.c to new-style i2c driver.
---
This needs testing! Both build-time and run-time.
drivers/i2c/chips/isp1301_omap.c | 59 +++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 29 deletions(-)
drivers/i2c/chips/isp1301_omap.c +30 -29
@@ -49,7 +49,8 @@ MODULE_LICENSE("GPL");struct isp1301 {struct otg_transceiver otg; -struct i2c_client client; +struct i2c_client *client; +struct i2c_client c;void (*i2c_release)(struct device *dev);int irq;
@@ -153,25 +154,25 @@ static struct i2c_driver isp1301_driver;static inline u8 isp1301_get_u8 (struct isp1301 *isp,u8 reg) { -return i2c_smbus_read_byte_data (&isp->client, reg +0 ); +return i2c_smbus_read_byte_data (isp->client, reg +0 ); }static inline int isp1301_get_u16 (struct isp1301 *isp,u8 reg) { -return i2c_smbus_read_word_data (&isp->client, reg); +return i2c_smbus_read_word_data (isp->client, reg); }static inline int isp1301_set_bits (struct isp1301 *isp,u8 reg,u8 bits) { -return i2c_smbus_write_byte_data (&isp->client, reg +0 , bits); +return i2c_smbus_write_byte_data (isp->client, reg +0 , bits); }static inline int isp1301_clear_bits (struct isp1301 *isp,u8 reg,u8 bits) { -return i2c_smbus_write_byte_data (&isp->client, reg +1 , bits); +return i2c_smbus_write_byte_data (isp->client, reg +1 , bits); }/*-------------------------------------------------------------------------*/
@@ -349,10 +350,10 @@ isp1301_defer_work(struct isp1301 *isp,int status;if (isp && !test_and_set_bit (work, &isp->todo)) { - (void )get_device (&isp->client.dev); + (void )get_device (&isp->client->dev); status =schedule_work (&isp->work);if (!status && !isp->working) -dev_vdbg (&isp->client.dev, +dev_vdbg (&isp->client->dev,"work item %d may be lost\n" , work); } }
@@ -1107,7 +1108,7 @@ isp1301_work(struct work_struct *work)/* transfer state from otg engine to isp1301 */ if (test_and_clear_bit (WORK_UPDATE_ISP , &isp->todo)) {otg_update_isp (isp); -put_device (&isp->client.dev); +put_device (&isp->client->dev); }#endif /* transfer state from isp1301 to otg engine */
@@ -1115,7 +1116,7 @@ isp1301_work(struct work_struct *work)u8 stat =isp1301_clear_latch (isp);isp_update_otg (isp, stat); -put_device (&isp->client.dev); +put_device (&isp->client->dev); }if (test_and_clear_bit (WORK_HOST_RESUME , &isp->todo)) {
@@ -1150,7 +1151,7 @@ isp1301_work(struct work_struct *work) }host_resume (isp);// mdelay(10); -put_device (&isp->client.dev); +put_device (&isp->client->dev); }if (test_and_clear_bit (WORK_TIMER , &isp->todo)) {
@@ -1159,15 +1160,15 @@ isp1301_work(struct work_struct *work)if (!stop)mod_timer (&isp->timer, jiffies +TIMER_JIFFIES );#endif -put_device (&isp->client.dev); +put_device (&isp->client->dev); }if (isp->todo) -dev_vdbg (&isp->client.dev, +dev_vdbg (&isp->client->dev,"work done, todo = 0x%lx\n" , isp->todo);if (stop) { -dev_dbg (&isp->client.dev,"stop\n" ); +dev_dbg (&isp->client->dev,"stop\n" );break ; } }while (isp->todo);
@@ -1191,7 +1192,7 @@ static void isp1301_release(struct devic {struct isp1301 *isp; - isp = container_of(dev, struct isp1301, client.dev); + isp =device_get_drvdata (dev);/* ugly -- i2c hijacks our memory hook to wait_for_completion() */ if (isp->i2c_release)
@@ -1205,7 +1206,7 @@ static int isp1301_detach_client(struct {struct isp1301 *isp; - isp = container_of(i2c, struct isp1301, client); + isp =i2c_get_clientdata (i2c);isp1301_clear_bits (isp,ISP1301_INTERRUPT_FALLING , ~0 );isp1301_clear_bits (isp,ISP1301_INTERRUPT_RISING , ~0 );
@@ -1257,7 +1258,7 @@ static int isp1301_otg_enable(struct ispisp1301_set_bits (isp,ISP1301_INTERRUPT_FALLING ,INTR_VBUS_VLD |INTR_SESS_VLD |INTR_ID_GND ); -dev_info (&isp->client.dev,"ready for dual-role USB ...\n" ); +dev_info (&isp->client->dev,"ready for dual-role USB ...\n" );return 0 ; }
@@ -1282,7 +1283,7 @@ isp1301_set_host(struct otg_transceiver#ifdef CONFIG_USB_OTG isp->otg.host = host; -dev_dbg (&isp->client.dev,"registered host\n" ); +dev_dbg (&isp->client->dev,"registered host\n" );host_suspend (isp);if (isp->otg.gadget)return isp1301_otg_enable (isp);
@@ -1297,7 +1298,7 @@ isp1301_set_host(struct otg_transceiverif (machine_is_omap_h2 ())isp1301_set_bits (isp,ISP1301_MODE_CONTROL_1 ,MC1_DAT_SE0 ); -dev_info (&isp->client.dev,"A-Host sessions ok\n" ); +dev_info (&isp->client->dev,"A-Host sessions ok\n" );isp1301_set_bits (isp,ISP1301_INTERRUPT_RISING ,INTR_ID_GND ); isp1301_set_bits(isp, ISP1301_INTERRUPT_FALLING,
@@ -1315,7 +1316,7 @@ isp1301_set_host(struct otg_transceiverreturn 0 ;#else -dev_dbg (&isp->client.dev,"host sessions not allowed\n" ); +dev_dbg (&isp->client->dev,"host sessions not allowed\n" );return -EINVAL ;#endif
@@ -1341,7 +1342,7 @@ isp1301_set_peripheral(struct otg_transc#ifdef CONFIG_USB_OTG isp->otg.gadget = gadget; -dev_dbg (&isp->client.dev,"registered gadget\n" ); +dev_dbg (&isp->client->dev,"registered gadget\n" );/* gadget driver may be suspended until vbus_connect () */ if (isp->otg.host)return isp1301_otg_enable (isp);
@@ -1364,7 +1365,7 @@ isp1301_set_peripheral(struct otg_transc INTR_SESS_VLD);isp1301_set_bits (isp,ISP1301_INTERRUPT_FALLING ,INTR_VBUS_VLD ); -dev_info (&isp->client.dev,"B-Peripheral sessions ok\n" ); +dev_info (&isp->client->dev,"B-Peripheral sessions ok\n" );dump_regs (isp, __func__);/* If this has a Mini-AB connector, this mode is highly
@@ -1377,7 +1378,7 @@ isp1301_set_peripheral(struct otg_transcreturn 0 ;#else -dev_dbg (&isp->client.dev,"peripheral sessions not allowed\n" ); +dev_dbg (&isp->client->dev,"peripheral sessions not allowed\n" );return -EINVAL ;#endif }
@@ -1493,12 +1494,12 @@ static int isp1301_probe(struct i2c_adap isp->timer.data = (unsigned long ) isp; isp->irq =-1 ; - isp->client.addr = address; -i2c_set_clientdata (&isp->client, isp); - isp->client.adapter = bus; - isp->client.driver = &isp1301_driver; -strlcpy (isp->client.name,DRIVER_NAME ,I2C_NAME_SIZE ); - i2c = &isp->client; + isp->c.addr = address; +i2c_set_clientdata (&isp->c, isp); + isp->c.adapter = bus; + isp->c.driver = &isp1301_driver; +strlcpy (isp->c.name,DRIVER_NAME ,I2C_NAME_SIZE ); + isp->client = i2c = &isp->c;/* if this is a true probe, verify the chip ... */ if (kind <0 ) {
@@ -1583,7 +1584,7 @@ fail2: goto fail1; } - isp->otg.dev = &isp->client.dev; + isp->otg.dev = &isp->client->dev; isp->otg.label =DRIVER_NAME ; isp->otg.set_host = isp1301_set_host,
From: Jean Delvare <[email protected]>
Subject: i2c/isp1301_omap: Convert to a new-style i2c driver, part 2
Based on David Brownell's patch for tps65010 and previous work by Felipe Balbi, this patch finishes conversting isp1301_omap to a new-style i2c driver.
There's definitely room for further drivers cleanups, but these are out of the scope of this patch.
---
This needs testing! Both build-time and run-time.
arch/arm/mach-omap1/board-h3.c | 4 + arch/arm/mach-omap2/board-h4.c | 11 ++++ drivers/i2c/chips/isp1301_omap.c | 98 ++++++++++++-------------------------- 3 files changed, 48 insertions(+), 65 deletions(-)
arch/arm/mach-omap1/board-h3.c +4 -0
@@ -476,6 +476,10 @@ static struct i2c_board_info __initdataI2C_BOARD_INFO ("tps65013" ,0x48 ),/* .irq = OMAP_GPIO_IRQ(??), */ }, + { +I2C_BOARD_INFO ("isp1301_omap" ,0x2d ), + .irq = OMAP_GPIO_IRQ(14), + }, }; static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
arch/arm/mach-omap2/board-h4.c +11 -0
@@ -18,6 +18,7 @@#include <linux/mtd/partitions.h> #include <linux/delay.h> #include <linux/workqueue.h> +#include <linux/i2c.h> #include <linux/input.h> #include <linux/err.h> #include <linux/clk.h>
@@ -392,6 +393,13 @@ static struct omap_board_config_kernel h { OMAP_TAG_LCD, &h4_lcd_config }, }; +static struct i2c_board_info __initdata h4_i2c_board_info[] = { + { +I2C_BOARD_INFO ("isp1301_omap" ,0x2d ), + .irq =OMAP_GPIO_IRQ (125 ), + }, +}; +static void __init omap_h4_init (void ) {/*
@@ -412,6 +420,9 @@ static void __init omap_h4_init(void) }#endif +i2c_register_board_info (1 , h4_i2c_board_info, +ARRAY_SIZE (h4_i2c_board_info)); +platform_add_devices (h4_devices,ARRAY_SIZE (h4_devices)); omap_board_config = h4_config; omap_board_config_size =ARRAY_SIZE (h4_config);
drivers/i2c/chips/isp1301_omap.c +33 -65
182 lines not on this page · raw message
Quoted 7 lines · Jean Delvare
Hi all,
I have converted the
isp1301_omapdriver to a new-style i2c driver. The problem is that I don't have an OMAP system nor even an ARM compiler, so I cannot test my work at all. So, I would appreciate if someone with access to an OMAP system could test if theisp1301_omapdriver still builds and works fine after applying the two attached patches.
Still no testers for these patches? These will have to go upstream at some point, as legacy i2c client support will be deprecated and ultimately dropped. The earlier the better. I would really prefer these patches to get some testing before I push them upstream, but if I can't get any feedback within a reasonable time frame, I guess I will have to just push them anyway and hope nothing breaks.
Thanks,
Signature · 1 line
Jean Delvare
From: Felipe Balbi <[email protected]>
Subject: i2c/isp1301_omap: Convert to a new-style i2c driver, part 1
Based on David Brownell's patch for tps65010, this patch starts converting isp1301_omap.c to new-style i2c driver.
---
This needs testing! Both build-time and run-time.
drivers/i2c/chips/isp1301_omap.c | 59 +++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 29 deletions(-)
drivers/i2c/chips/isp1301_omap.c +30 -29
@@ -49,7 +49,8 @@ MODULE_LICENSE("GPL");struct isp1301 {struct otg_transceiver otg; -struct i2c_client client; +struct i2c_client *client; +struct i2c_client c;void (*i2c_release)(struct device *dev);int irq;
@@ -153,25 +154,25 @@ static struct i2c_driver isp1301_driver;static inline u8 isp1301_get_u8 (struct isp1301 *isp,u8 reg) { -return i2c_smbus_read_byte_data (&isp->client, reg +0 ); +return i2c_smbus_read_byte_data (isp->client, reg +0 ); }static inline int isp1301_get_u16 (struct isp1301 *isp,u8 reg) { -return i2c_smbus_read_word_data (&isp->client, reg); +return i2c_smbus_read_word_data (isp->client, reg); }static inline int isp1301_set_bits (struct isp1301 *isp,u8 reg,u8 bits) { -return i2c_smbus_write_byte_data (&isp->client, reg +0 , bits); +return i2c_smbus_write_byte_data (isp->client, reg +0 , bits); }static inline int isp1301_clear_bits (struct isp1301 *isp,u8 reg,u8 bits) { -return i2c_smbus_write_byte_data (&isp->client, reg +1 , bits); +return i2c_smbus_write_byte_data (isp->client, reg +1 , bits); }/*-------------------------------------------------------------------------*/
@@ -349,10 +350,10 @@ isp1301_defer_work(struct isp1301 *isp,int status;if (isp && !test_and_set_bit (work, &isp->todo)) { - (void )get_device (&isp->client.dev); + (void )get_device (&isp->client->dev); status =schedule_work (&isp->work);if (!status && !isp->working) -dev_vdbg (&isp->client.dev, +dev_vdbg (&isp->client->dev,"work item %d may be lost\n" , work); } }
@@ -1135,7 +1136,7 @@ isp1301_work(struct work_struct *work)/* transfer state from otg engine to isp1301 */ if (test_and_clear_bit (WORK_UPDATE_ISP , &isp->todo)) {otg_update_isp (isp); -put_device (&isp->client.dev); +put_device (&isp->client->dev); }#endif /* transfer state from isp1301 to otg engine */
@@ -1143,7 +1144,7 @@ isp1301_work(struct work_struct *work)u8 stat =isp1301_clear_latch (isp);isp_update_otg (isp, stat); -put_device (&isp->client.dev); +put_device (&isp->client->dev); }if (test_and_clear_bit (WORK_HOST_RESUME , &isp->todo)) {
@@ -1178,7 +1179,7 @@ isp1301_work(struct work_struct *work) }host_resume (isp);// mdelay(10); -put_device (&isp->client.dev); +put_device (&isp->client->dev); }if (test_and_clear_bit (WORK_TIMER , &isp->todo)) {
@@ -1187,15 +1188,15 @@ isp1301_work(struct work_struct *work)if (!stop)mod_timer (&isp->timer, jiffies +TIMER_JIFFIES );#endif -put_device (&isp->client.dev); +put_device (&isp->client->dev); }if (isp->todo) -dev_vdbg (&isp->client.dev, +dev_vdbg (&isp->client->dev,"work done, todo = 0x%lx\n" , isp->todo);if (stop) { -dev_dbg (&isp->client.dev,"stop\n" ); +dev_dbg (&isp->client->dev,"stop\n" );break ; } }while (isp->todo);
@@ -1219,7 +1220,7 @@ static void isp1301_release(struct devic {struct isp1301 *isp; - isp = container_of(dev, struct isp1301, client.dev); + isp =device_get_drvdata (dev);/* ugly -- i2c hijacks our memory hook to wait_for_completion() */ if (isp->i2c_release)
@@ -1233,7 +1234,7 @@ static int isp1301_detach_client(struct {struct isp1301 *isp; - isp = container_of(i2c, struct isp1301, client); + isp =i2c_get_clientdata (i2c);isp1301_clear_bits (isp,ISP1301_INTERRUPT_FALLING , ~0 );isp1301_clear_bits (isp,ISP1301_INTERRUPT_RISING , ~0 );
@@ -1285,7 +1286,7 @@ static int isp1301_otg_enable(struct ispisp1301_set_bits (isp,ISP1301_INTERRUPT_FALLING ,INTR_VBUS_VLD |INTR_SESS_VLD |INTR_ID_GND ); -dev_info (&isp->client.dev,"ready for dual-role USB ...\n" ); +dev_info (&isp->client->dev,"ready for dual-role USB ...\n" );return 0 ; }
@@ -1310,7 +1311,7 @@ isp1301_set_host(struct otg_transceiver#ifdef CONFIG_USB_OTG isp->otg.host = host; -dev_dbg (&isp->client.dev,"registered host\n" ); +dev_dbg (&isp->client->dev,"registered host\n" );host_suspend (isp);if (isp->otg.gadget)return isp1301_otg_enable (isp);
@@ -1325,7 +1326,7 @@ isp1301_set_host(struct otg_transceiverif (machine_is_omap_h2 ())isp1301_set_bits (isp,ISP1301_MODE_CONTROL_1 ,MC1_DAT_SE0 ); -dev_info (&isp->client.dev,"A-Host sessions ok\n" ); +dev_info (&isp->client->dev,"A-Host sessions ok\n" );isp1301_set_bits (isp,ISP1301_INTERRUPT_RISING ,INTR_ID_GND ); isp1301_set_bits(isp, ISP1301_INTERRUPT_FALLING,
@@ -1343,7 +1344,7 @@ isp1301_set_host(struct otg_transceiverreturn 0 ;#else -dev_dbg (&isp->client.dev,"host sessions not allowed\n" ); +dev_dbg (&isp->client->dev,"host sessions not allowed\n" );return -EINVAL ;#endif
@@ -1370,7 +1371,7 @@ isp1301_set_peripheral(struct otg_transc#ifdef CONFIG_USB_OTG isp->otg.gadget = gadget; -dev_dbg (&isp->client.dev,"registered gadget\n" ); +dev_dbg (&isp->client->dev,"registered gadget\n" );/* gadget driver may be suspended until vbus_connect () */ if (isp->otg.host)return isp1301_otg_enable (isp);
@@ -1395,7 +1396,7 @@ isp1301_set_peripheral(struct otg_transc INTR_SESS_VLD);isp1301_set_bits (isp,ISP1301_INTERRUPT_FALLING ,INTR_VBUS_VLD ); -dev_info (&isp->client.dev,"B-Peripheral sessions ok\n" ); +dev_info (&isp->client->dev,"B-Peripheral sessions ok\n" );dump_regs (isp, __func__);/* If this has a Mini-AB connector, this mode is highly
@@ -1408,7 +1409,7 @@ isp1301_set_peripheral(struct otg_transcreturn 0 ;#else -dev_dbg (&isp->client.dev,"peripheral sessions not allowed\n" ); +dev_dbg (&isp->client->dev,"peripheral sessions not allowed\n" );return -EINVAL ;#endif }
@@ -1528,12 +1529,12 @@ static int isp1301_probe(struct i2c_adap isp->timer.data = (unsigned long ) isp; isp->irq =-1 ; - isp->client.addr = address; -i2c_set_clientdata (&isp->client, isp); - isp->client.adapter = bus; - isp->client.driver = &isp1301_driver; -strlcpy (isp->client.name,DRIVER_NAME ,I2C_NAME_SIZE ); - i2c = &isp->client; + isp->c.addr = address; +i2c_set_clientdata (&isp->c, isp); + isp->c.adapter = bus; + isp->c.driver = &isp1301_driver; +strlcpy (isp->c.name,DRIVER_NAME ,I2C_NAME_SIZE ); + isp->client = i2c = &isp->c;/* if this is a true probe, verify the chip ... */ if (kind <0 ) {
@@ -1618,7 +1619,7 @@ fail2: goto fail1; } - isp->otg.dev = &isp->client.dev; + isp->otg.dev = &isp->client->dev; isp->otg.label =DRIVER_NAME ; isp->otg.set_host = isp1301_set_host,
From: Jean Delvare <[email protected]>
Subject: i2c/isp1301_omap: Convert to a new-style i2c driver, part 2
Based on David Brownell's patch for tps65010 and previous work by Felipe Balbi, this patch finishes conversting isp1301_omap to a new-style i2c driver.
There's definitely room for further drivers cleanups, but these are out of the scope of this patch.
---
This needs testing! Both build-time and run-time.
arch/arm/mach-omap1/board-h3.c | 4 + arch/arm/mach-omap2/board-h4.c | 11 ++++ drivers/i2c/chips/isp1301_omap.c | 98 ++++++++++++-------------------------- 3 files changed, 48 insertions(+), 65 deletions(-)
arch/arm/mach-omap1/board-h3.c +4 -0
@@ -476,6 +476,10 @@ static struct i2c_board_info __initdataI2C_BOARD_INFO ("tps65013" ,0x48 ),/* .irq = OMAP_GPIO_IRQ(??), */ }, + { +I2C_BOARD_INFO ("isp1301_omap" ,0x2d ), + .irq = OMAP_GPIO_IRQ(14), + }, }; static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
arch/arm/mach-omap2/board-h4.c +11 -0
@@ -18,6 +18,7 @@#include <linux/mtd/partitions.h> #include <linux/delay.h> #include <linux/workqueue.h> +#include <linux/i2c.h> #include <linux/input.h> #include <linux/err.h> #include <linux/clk.h>
@@ -392,6 +393,13 @@ static struct omap_board_config_kernel h { OMAP_TAG_LCD, &h4_lcd_config }, }; +static struct i2c_board_info __initdata h4_i2c_board_info[] = { + { +I2C_BOARD_INFO ("isp1301_omap" ,0x2d ), + .irq =OMAP_GPIO_IRQ (125 ), + }, +}; +static void __init omap_h4_init (void ) {/*
@@ -412,6 +420,9 @@ static void __init omap_h4_init(void) }#endif +i2c_register_board_info (1 , h4_i2c_board_info, +ARRAY_SIZE (h4_i2c_board_info)); +platform_add_devices (h4_devices,ARRAY_SIZE (h4_devices)); omap_board_config = h4_config; omap_board_config_size =ARRAY_SIZE (h4_config);
drivers/i2c/chips/isp1301_omap.c +33 -65
182 lines not on this page · raw message
Quoted 1 line · Jean Delvare
Still no testers for these patches?
Right now I don't seem to be able to boot OMAP1 in mainline, so pulling that H2 out of its box would be futile. :(
Tony Lindgren
maintainerQuoted 5 lines · David Brownell
Quoted 1 line · Jean Delvare
Still no testers for these patches?
Right now I don't seem to be able to boot OMAP1 in mainline, so pulling that H2 out of its box would be futile. :(
Grr, looks like I can't access my H2 remotely right now as my remote power switch is hung, and would need to be remote rebooted..
So I can't access H2 for few more weeks, can somebody else test on H2 meanwhile?
BTW, this patch should OK to apply as we've had it in the linux-omap tree since December, and I've occasionally boot tested H2, last time I think was when I removed the __REG macros few months ago.
Regards,
Tony
Hi Tony,
Quoted 10 lines · Tony Lindgren
Quoted 5 lines · David Brownell
Quoted 1 line · Jean Delvare
Still no testers for these patches?
Right now I don't seem to be able to boot OMAP1 in mainline, so pulling that H2 out of its box would be futile. :(
Grr, looks like I can't access my H2 remotely right now as my remote power switch is hung, and would need to be remote rebooted..
Quoted 7 lines
So I can't access H2 for few more weeks, can somebody else test on H2 meanwhile?
BTW, this patch should OK to apply as we've had it in the linux-omap tree since December, and I've occasionally boot tested H2, last time I think was when I removed the
__REGmacros few months ago.
It is possible that you have had the 1st patch in your tree for some time. However, the second patch I wrote 1.5 month ago or so, so I doubt that you can have it in your tree since December 2007 ;)
Maybe your can update the omap tree with my patches? This would give them the testing they are missing, and then we can push them upstream. Ideally that would have gone in 2.6.27, but it starts being a bit late for that now.
Thanks,
Signature · 1 line
Jean Delvare
Quoted 4 lines · ext Jean Delvare
Maybe your can update the omap tree with my patches? This would give them the testing they are missing, and then we can push them upstream. Ideally that would have gone in 2.6.27, but it starts being a bit late for that now.
Yeah, Jean modified my sencond patch and got to a better solution, I think it's worthy to apply his patch on l-o.
Signature · 1 line
balbi
Tony Lindgren
maintainerHi,
Quoted 16 lines · Jean Delvare
Hi Tony,
Quoted 13 lines · Tony Lindgren
Quoted 5 lines · David Brownell
Quoted 1 line · Jean Delvare
Still no testers for these patches?
Right now I don't seem to be able to boot OMAP1 in mainline, so pulling that H2 out of its box would be futile. :(
Grr, looks like I can't access my H2 remotely right now as my remote power switch is hung, and would need to be remote rebooted..
So I can't access H2 for few more weeks, can somebody else test on H2 meanwhile?
Quoted 8 lines
Quoted 4 lines
BTW, this patch should OK to apply as we've had it in the linux-omap tree since December, and I've occasionally boot tested H2, last time I think was when I removed the
__REGmacros few months ago.It is possible that you have had the 1st patch in your tree for some time. However, the second patch I wrote 1.5 month ago or so, so I doubt that you can have it in your tree since December 2007 ;)
Sorry, I totally missed your second patch. I guess I was just looking at the patch name which is same.
Quoted 4 lines
Maybe your can update the omap tree with my patches? This would give them the testing they are missing, and then we can push them upstream. Ideally that would have gone in 2.6.27, but it starts being a bit late for that now.
Yeah, I will add it to linux-omap for testing for sure. This should be easy to test though, it either works or does not.. But we need to find somebody to boot it and connect USB cable to it :)
Thanks,
Tony
Quoted 3 lines · Tony Lindgren
Yeah, I will add it to linux-omap for testing for sure. This should be easy to test though, it either works or does not.. But we need to find somebody to boot it and connect USB cable to it :)
Hi Carlos,
could you test it for us on H2 ??
Do you guys still have H2 boards there ?
Signature · 1 line
balbi
Tony Lindgren
maintainerPATCH 1/1 Fix isp1301_omap compile (Re: testers wanted: isp1301_omap conversion to new-style i2c driver)
Hi,
Quoted 10 lines · Felipe Balbi
Quoted 3 lines · Tony Lindgren
Yeah, I will add it to linux-omap for testing for sure. This should be easy to test though, it either works or does not.. But we need to find somebody to boot it and connect USB cable to it :)
Hi Carlos,
could you test it for us on H2 ??
Do you guys still have H2 boards there ?
Also H4 needs to be tested.
I've synced linux-omap tree with mainline tree at v2.6.27-rc2, and applied Felipe's and Jean's patches. Following patch should be merged to them to fix compile.
Regards,
Tony
Quoted 1 line
From
d12a00e66e97f2e808217eb3e9c9e88d4a281530Mon Sep 17 00:00:00 2001
From: Tony Lindgren <[email protected]>
Date: Mon, 11 Aug 2008 17:45:32 +0300
Subject: [PATCH] I2C: Fix isp1301_omap.c compile
Fix isp1301_omap.c compile
drivers/i2c/chips/isp1301_omap.c +2 -2
@@ -1210,7 +1210,7 @@ static void isp1301_release(struct device *dev) {struct isp1301 *isp; - isp =device_get_drvdata (dev); + isp =dev_get_drvdata (dev);/* ugly -- i2c hijacks our memory hook to wait_for_completion() */ if (isp->i2c_release)
@@ -1564,7 +1564,7 @@ static int __init isp1301_probe(struct i2c_client *i2c)if (machine_is_omap_h2 ()) {/* full speed signaling by default */ isp1301_set_bits (isp,ISP1301_MODE_CONTROL_1 , -MC1_SPEED_REG ); +MC1_SPEED );isp1301_set_bits (isp,ISP1301_MODE_CONTROL_2 ,MC2_SPD_SUSP_CTRL );
Re: [PATCH] Fix isp1301_omap compile (Re: testers wanted: isp1301_omap conversion to new-style i2c driver)
Hi Tony,
Quoted 12 lines · Tony Lindgren
Hi,
Quoted 9 lines · Felipe Balbi
Quoted 3 lines · Tony Lindgren
Yeah, I will add it to linux-omap for testing for sure. This should be easy to test though, it either works or does not.. But we need to find somebody to boot it and connect USB cable to it :)
Hi Carlos,
could you test it for us on H2 ??
Quoted 7 lines
Quoted 1 line
Do you guys still have H2 boards there ?
Also H4 needs to be tested.
I've synced linux-omap tree with mainline tree at v2.6.27-rc2, and applied Felipe's and Jean's patches. Following patch should be merged to them to fix compile.
Thank you.
Quoted 14 lines
From
d12a00e66e97f2e808217eb3e9c9e88d4a281530Mon Sep 17 00:00:00 2001
From: Tony Lindgren <[email protected]>
Date: Mon, 11 Aug 2008 17:45:32 +0300
Subject: [PATCH] I2C: Fixisp1301_omap.ccompileFix
isp1301_omap.ccompileSigned-off-by Tony Lindgren <[email protected]>drivers/i2c/chips/isp1301_omap.c +0
-0
drivers/i2c/chips/isp1301_omap.c static void isp1301_release(struct device *dev) · line 1216
Quoted 8 lines
drivers/i2c/chips/isp1301_omap.c +1
-1@@ -1210,7 +1210,7 @@ static void isp1301_release(struct device *dev) {struct isp1301 *isp; - isp =device_get_drvdata (dev); + isp =dev_get_drvdata (dev);/* ugly -- i2c hijacks our memory hook to wait_for_completion() */ if (isp->i2c_release)
Oops, good catch, thanks. Fixed.
drivers/i2c/chips/isp1301_omap.c static int __init isp1301_probe(struct i2c_client *i2c) · line 1570
Quoted 9 lines
drivers/i2c/chips/isp1301_omap.c +1
-1@@ -1564,7 +1564,7 @@ static int __init isp1301_probe(struct i2c_client *i2c)if (machine_is_omap_h2 ()) {/* full speed signaling by default */ isp1301_set_bits (isp,ISP1301_MODE_CONTROL_1 , -MC1_SPEED_REG ); +MC1_SPEED );isp1301_set_bits (isp,ISP1301_MODE_CONTROL_2 ,MC2_SPD_SUSP_CTRL );
That one isn't mine, the original code already has the problem. Apparently this was broken by the following patch from David:
The fix should be sent to Linus ASAP, otherwise the driver won't build in 2.6.27. You have my ack.
Signature · 1 line
Jean Delvare
Re: [PATCH] Fix isp1301_omap compile (Re: testers wanted: isp1301_omap conversion to new-style i2c driver)
Quoted 4 lines
That one isn't mine, the original code already has the problem. Apparently this was broken by the following patch from David:
f35ae6346850f6c192269b09088b20261760f0e0
Tony, actually ... there were some issues in the omap_udc code too.
Quoted 2 lines
The fix should be sent to Linus ASAP, otherwise the driver won't build in 2.6.27. You have my ack.
Tony Lindgren
maintainerRe: [PATCH] Fix isp1301_omap compile (Re: testers wanted: isp1301_omap conversion to new-style i2c driver)
Quoted 6 lines · David Brownell
Quoted 4 lines
That one isn't mine, the original code already has the problem. Apparently this was broken by the following patch from David:
f35ae6346850f6c192269b09088b20261760f0e0Tony, actually ... there were some issues in the
omap_udccode too.
Yeah, blame it on me, looks like I missed that one somehow with the __REG removal.
Quoted 2 lines
Quoted 2 lines
The fix should be sent to Linus ASAP, otherwise the driver won't build in 2.6.27. You have my ack.
Can you send it via your I2C? Let me know if your want me to send it via arm-omap fixes.
Regards,
Tony
Re: [PATCH] Fix isp1301_omap compile (Re: testers wanted: isp1301_omap conversion to new-style i2c driver)
Hi Tony,
Quoted 8 lines · Tony Lindgren
Quoted 6 lines · David Brownell
Quoted 4 lines
That one isn't mine, the original code already has the problem. Apparently this was broken by the following patch from David:
f35ae6346850f6c192269b09088b20261760f0e0Tony, actually ... there were some issues in the
omap_udccode too.
Quoted 8 lines
Yeah, blame it on me, looks like I missed that one somehow with the
__REGremoval.Quoted 2 lines
Quoted 2 lines
The fix should be sent to Linus ASAP, otherwise the driver won't build in 2.6.27. You have my ack.
Can you send it via your I2C? Let me know if your want me to send it via arm-omap fixes.
Please take care of it. The patch that broke the driver came through your tree so I think it makes more sense to have the fix come through your tree as well.
Thanks,
Signature · 1 line
Jean Delvare
Tony Lindgren
maintainerRe: [PATCH] Fix isp1301_omap compile (Re: testers wanted: isp1301_omap conversion to new-style i2c driver)
Quoted 17 lines · Jean Delvare
Hi Tony,
Quoted 14 lines · Tony Lindgren
Quoted 6 lines · David Brownell
Quoted 4 lines
That one isn't mine, the original code already has the problem. Apparently this was broken by the following patch from David:
f35ae6346850f6c192269b09088b20261760f0e0Tony, actually ... there were some issues in the
omap_udccode too.Yeah, blame it on me, looks like I missed that one somehow with the
__REGremoval.Quoted 2 lines
Quoted 2 lines
The fix should be sent to Linus ASAP, otherwise the driver won't build in 2.6.27. You have my ack.
Quoted 6 lines
Quoted 2 lines
Can you send it via your I2C? Let me know if your want me to send it via arm-omap fixes.
Please take care of it. The patch that broke the driver came through your tree so I think it makes more sense to have the fix come through your tree as well.
Well looks like there's already cbbcb9b0c7e4d1fd90cf54427382dae525773dc2 taking care of it the second part of my earlier patch.
But the following patch still needs to be merged into Felipe's "2c/isp1301_omap: Convert to a new-style i2c driver, part 1" patch.
Tony
commit d12a00e66e97f2e808217eb3e9c9e88d4a281530
Author: Tony Lindgren <[email protected]> Date: Mon Aug 11 17:45:32 2008 +0300
I2C: Fix isp1301_omap.c compile
Fix isp1301_omap.c compile
drivers/i2c/chips/isp1301_omap.c +1 -1
@@ -1210,7 +1210,7 @@ static void isp1301_release(struct device *dev) {struct isp1301 *isp; - isp =device_get_drvdata (dev); + isp =dev_get_drvdata (dev);/* ugly -- i2c hijacks our memory hook to wait_for_completion() */ if (isp->i2c_release)
Re: [PATCH] Fix isp1301_omap compile (Re: testers wanted: isp1301_omap conversion to new-style i2c driver)
Quoted 25 lines · Tony Lindgren
Quoted 17 lines · Jean Delvare
Hi Tony,
Quoted 14 lines · Tony Lindgren
Quoted 6 lines · David Brownell
Quoted 4 lines
That one isn't mine, the original code already has the problem. Apparently this was broken by the following patch from David:
f35ae6346850f6c192269b09088b20261760f0e0Tony, actually ... there were some issues in the
omap_udccode too.Yeah, blame it on me, looks like I missed that one somehow with the
__REGremoval.Quoted 2 lines
Quoted 2 lines
The fix should be sent to Linus ASAP, otherwise the driver won't build in 2.6.27. You have my ack.
Quoted 6 lines
Quoted 2 lines
Can you send it via your I2C? Let me know if your want me to send it via arm-omap fixes.
Please take care of it. The patch that broke the driver came through your tree so I think it makes more sense to have the fix come through your tree as well.
Quoted 5 lines
Well looks like there's already
cbbcb9b0c7e4d1fd90cf54427382dae525773dc2taking care of it the second part of my earlier patch.But the following patch still needs to be merged into Felipe's "2c/isp1301_omap: Convert to a new-style i2c driver, part 1" patch.
I've done that already.
Signature · 1 line
Jean Delvare
Tony Lindgren
maintainerRe: [PATCH] Fix isp1301_omap compile (Re: testers wanted: isp1301_omap conversion to new-style i2c driver)
Quoted 26 lines · Jean Delvare
Quoted 25 lines · Tony Lindgren
Quoted 23 lines · Jean Delvare
Hi Tony,
Quoted 8 lines · Tony Lindgren
Quoted 6 lines · David Brownell
Quoted 4 lines
That one isn't mine, the original code already has the problem. Apparently this was broken by the following patch from David:
f35ae6346850f6c192269b09088b20261760f0e0Tony, actually ... there were some issues in the
omap_udccode too.Quoted 8 lines
Yeah, blame it on me, looks like I missed that one somehow with the
__REGremoval.Quoted 2 lines
Quoted 2 lines
The fix should be sent to Linus ASAP, otherwise the driver won't build in 2.6.27. You have my ack.
Can you send it via your I2C? Let me know if your want me to send it via arm-omap fixes.
Please take care of it. The patch that broke the driver came through your tree so I think it makes more sense to have the fix come through your tree as well.
Quoted 7 lines
Quoted 5 lines
Well looks like there's already
cbbcb9b0c7e4d1fd90cf54427382dae525773dc2taking care of it the second part of my earlier patch.But the following patch still needs to be merged into Felipe's "2c/isp1301_omap: Convert to a new-style i2c driver, part 1" patch.
I've done that already.
OK, great.
Tony
Re: [PATCH] Fix isp1301_omap compile (Re: testers wanted: isp1301_omap conversion to new-style i2c driver)
In reply to Tony LindgrenQuoted 6 lines
Quoted 3 lines
Quoted 1 line
f35ae6346850f6c192269b09088b20261760f0e0Tony, actually ... there were some issues in the
omap_udccode too.Yeah, blame it on me, looks like I missed that one somehow with the
__REGremoval.
So did a lot of other folk!
Re: [PATCH] Fix isp1301_omap compile (Re: testers wanted: isp1301_omap conversion to new-style i2c driver)
In reply to Tony LindgrenQuoted 3 lines
Quoted 1 line
Do you guys still have H2 boards there ?
Also H4 needs to be tested.
H2 needs to be tested with upstream kernels and OTG ... as I recall, the linux-OMAP kernel has patches that made OTG work on H3 (and I'd assume H4 too) but broke it completely on H2.
- Dave
Hi,
Quoted 10 lines · Felipe Balbi
Quoted 3 lines · Tony Lindgren
Yeah, I will add it to linux-omap for testing for sure. This should be easy to test though, it either works or does not.. But we need to find somebody to boot it and connect USB cable to it :)
Hi Carlos,
could you test it for us on H2 ??
Do you guys still have H2 boards there ?
Jean, sorry for the long delay on getting this tested. Here's what happens on H2 after Felipe's and your isp_1301.c patches:
# otg: b_idle, SWITCH to gadget, ctrl 018021
otg: a_idle, SWITCH to host, ctrl 080021
otg: a_vbus_err, VBUS_ERR 2000 ctrl 140821 hub 1-0:1.0: unable to enumerate USB device on port 2
So things work the same as before them.
Here's my ack for the following patches:
i2c/isp1301_omap: Convert to a new-style i2c driver, part 1 i2c/isp1301_omap: Convert to a new-style i2c driver, part 2
Regards,
Tony
Hi Tony,
Quoted 22 lines · Tony Lindgren
Hi,
Quoted 10 lines · Felipe Balbi
Quoted 3 lines · Tony Lindgren
Yeah, I will add it to linux-omap for testing for sure. This should be easy to test though, it either works or does not.. But we need to find somebody to boot it and connect USB cable to it :)
Hi Carlos,
could you test it for us on H2 ??
Do you guys still have H2 boards there ?
Jean, sorry for the long delay on getting this tested. Here's what happens on H2 after Felipe's and your
isp_1301.cpatches:# otg:
b_idle, SWITCH to gadget, ctrl 018021
otg:a_idle, SWITCH to host, ctrl 080021
otg:a_vbus_err,VBUS_ERR2000 ctrl 140821 hub 1-0:1.0: unable to enumerate USB device on port 2
Quoted 8 lines
So things work the same as before them.
Here's my ack for the following patches:
i2c/isp1301_omap: Convert to a new-style i2c driver, part 1 i2c/isp1301_omap: Convert to a new-style i2c driver, part 2
Acked-by Tony Lindgren <[email protected]>
Thanks for testing and reporting! Both patches are in my i2c tree and scheduled to be send to Linus for kernel 2.6.28.
Signature · 1 line
Jean Delvare