i2c: designware: Cleanups (part 4)
Subsystems (3)
Andy Shevchenko
reviewercover i2c: designware: Cleanups (part 4)
This is the subset of the patches [1] that should not affect any functionality. Here are:
- tiding up the probe and remove functions
- dead and redundant code removal
- spelling fixes
In any case this is Cc'ed to AMD who reported a problem in [1] presumably in the patch that is *not* included here.
This is assumed to be the last straightforward patch series to clean up the driver. The rest is directly related or dependent on the reported problem and needs more thinking and work. Perhaps I can do it in the future.
Andy Shevchenko (5):
i2c: designware: Use temporary variable for struct device
i2c: designware: Get rid of redundant 'else'
i2c: designware: Remove 'cond' from i2c_dw_scl_hcnt()
i2c: designware: Use sda_hold_time variable name everywhere
i2c: designware: Fix spelling and other issues in the comments
drivers/i2c/busses/i2c-designware-amdpsp.c | 10 ++-- drivers/i2c/busses/i2c-designware-common.c | 66 +++++++-------------- drivers/i2c/busses/i2c-designware-core.h | 12 ++-- drivers/i2c/busses/i2c-designware-master.c | 17 +++--- drivers/i2c/busses/i2c-designware-pcidrv.c | 39 ++++++------ drivers/i2c/busses/i2c-designware-platdrv.c | 52 ++++++++-------- drivers/i2c/busses/i2c-designware-slave.c | 6 +- 7 files changed, 90 insertions(+), 112 deletions(-)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Andy Shevchenko
reviewerPATCH 1/5 i2c: designware: Use temporary variable for struct device
Use temporary variable for struct device to make code neater.
--- drivers/i2c/busses/i2c-designware-pcidrv.c | 29 ++++++------- drivers/i2c/busses/i2c-designware-platdrv.c | 48 ++++++++++----------- 2 files changed, 37 insertions(+), 40 deletions(-)
drivers/i2c/busses/i2c-designware-pcidrv.c +14 -15
@@ -207,6 +207,7 @@ static const struct software_node dgpu_node = {static int i2c_dw_pci_probe (struct pci_dev *pdev,const struct pci_device_id *id) { +struct device *device = &pdev->dev;struct dw_i2c_dev *dev;struct i2c_adapter *adap;int r;
@@ -214,25 +215,22 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,struct dw_scl_sda_cfg *cfg;if (id->driver_data >=ARRAY_SIZE (dw_pci_controllers)) -return dev_err_probe (&pdev->dev, -EINVAL , -"Invalid driver data %ld\n" , +return dev_err_probe (device, -EINVAL ,"Invalid driver data %ld\n" , id->driver_data); controller = &dw_pci_controllers[id->driver_data]; r =pcim_enable_device (pdev);if (r) -return dev_err_probe (&pdev->dev, r, -"Failed to enable I2C PCI device\n" ); +return dev_err_probe (device, r,"Failed to enable I2C PCI device\n" );pci_set_master (pdev); r =pcim_iomap_regions (pdev,1 <<0 ,pci_name (pdev));if (r) -return dev_err_probe (&pdev->dev, r, -"I/O memory remapping failed\n" ); +return dev_err_probe (device, r,"I/O memory remapping failed\n" ); - dev =devm_kzalloc (&pdev->dev,sizeof (*dev),GFP_KERNEL ); + dev =devm_kzalloc (device,sizeof (*dev),GFP_KERNEL );if (!dev)return -ENOMEM ;
@@ -242,7 +240,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, dev->get_clk_rate_khz = controller->get_clk_rate_khz; dev->base =pcim_iomap_table (pdev)[0 ]; - dev->dev = &pdev->dev; + dev->dev = device; dev->irq =pci_irq_vector (pdev,0 ); dev->flags |= controller->flags;
@@ -281,14 +279,14 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,if ((dev->flags &MODEL_MASK ) ==MODEL_AMD_NAVI_GPU ) { dev->slave =i2c_new_ccgx_ucsi (&dev->adapter, dev->irq, &dgpu_node);if (IS_ERR (dev->slave)) -return dev_err_probe (dev->dev,PTR_ERR (dev->slave), +return dev_err_probe (device,PTR_ERR (dev->slave),"register UCSI failed\n" ); } -pm_runtime_set_autosuspend_delay (&pdev->dev,1000 ); -pm_runtime_use_autosuspend (&pdev->dev); -pm_runtime_put_autosuspend (&pdev->dev); -pm_runtime_allow (&pdev->dev); +pm_runtime_set_autosuspend_delay (device,1000 ); +pm_runtime_use_autosuspend (device); +pm_runtime_put_autosuspend (device); +pm_runtime_allow (device);return 0 ; }
@@ -296,11 +294,12 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,static void i2c_dw_pci_remove (struct pci_dev *pdev) {struct dw_i2c_dev *dev =pci_get_drvdata (pdev); +struct device *device = &pdev->dev;i2c_dw_disable (dev); -pm_runtime_forbid (&pdev->dev); -pm_runtime_get_noresume (&pdev->dev); +pm_runtime_forbid (device); +pm_runtime_get_noresume (device);i2c_del_adapter (&dev->adapter); }
drivers/i2c/busses/i2c-designware-platdrv.c +23 -25
107 lines not on this page · raw message
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Andy Shevchenko
reviewerPATCH 2/5 i2c: designware: Get rid of redundant 'else'
In reply to Andy ShevchenkoIn the snippets like the following
if (...) return / goto / break / continue ...; else ...
the 'else' is redundant. Get rid of it.
--- drivers/i2c/busses/i2c-designware-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/i2c/busses/i2c-designware-common.c +3 -3
@@ -676,10 +676,10 @@ int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev)if (abort_source &DW_IC_TX_ARB_LOST )return -EAGAIN ; -else if (abort_source &DW_IC_TX_ABRT_GCALL_READ ) +if (abort_source &DW_IC_TX_ABRT_GCALL_READ )return -EINVAL ;/* wrong msgs[] data */ -else -return -EIO ; + +return -EIO ; }int i2c_dw_set_fifo_size (struct dw_i2c_dev *dev)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Andy Shevchenko
reviewerPATCH 3/5 i2c: designware: Remove 'cond' from i2c_dw_scl_hcnt()
In reply to Andy ShevchenkoThe 'cond' parameter is not being used (always default, hence drop it and hence make it consistent with i2c_dw_scl_lcnt().
--- drivers/i2c/busses/i2c-designware-common.c | 52 +++++++--------------- drivers/i2c/busses/i2c-designware-core.h | 2 +- drivers/i2c/busses/i2c-designware-master.c | 4 -- 3 files changed, 16 insertions(+), 42 deletions(-)
drivers/i2c/busses/i2c-designware-common.c +15 -37
@@ -407,47 +407,26 @@ static u32 i2c_dw_read_scl_reg(struct dw_i2c_dev *dev, u32 reg) }u32 i2c_dw_scl_hcnt (struct dw_i2c_dev *dev,unsigned int reg,u32 ic_clk, -u32 tSYMBOL,u32 tf,int cond,int offset) +u32 tSYMBOL,u32 tf,int offset) {if (!ic_clk)return i2c_dw_read_scl_reg (dev, reg);/* -* DesignWare I2C core doesn't seem to have solid strategy to meet -* the tHD;STA timing spec. Configuring _HCNT based on tHIGH spec -* will result in violation of the tHD;STA spec. +* Conditional expression: +* +* IC_[FS]S_SCL_HCNT + 3 >= IC_CLK * (tHD;STA + tf) +* +* This is just experimental rule; the tHD;STA period turned +* out to be proportinal to (_HCNT + 3). With this setting, +* we could meet both tHIGH and tHD;STA timing specs. +* +* If unsure, you'd better to take this alternative. +* +* The reason why we need to take into account "tf" here, +* is the same as described in i2c_dw_scl_lcnt(). */ -if (cond) -/* -* Conditional expression: -* -* IC_[FS]S_SCL_HCNT + (1+4+3) >= IC_CLK * tHIGH -* -* This is based on the DW manuals, and represents an ideal -* configuration. The resulting I2C bus speed will be -* faster than any of the others. -* -* If your hardware is free from tHD;STA issue, try this one. -*/ -return DIV_ROUND_CLOSEST_ULL ((u64 )ic_clk * tSYMBOL,MICRO ) - -8 + offset; -else -/* -* Conditional expression: -* -* IC_[FS]S_SCL_HCNT + 3 >= IC_CLK * (tHD;STA + tf) -* -* This is just experimental rule; the tHD;STA period turned -* out to be proportinal to (_HCNT + 3). With this setting, -* we could meet both tHIGH and tHD;STA timing specs. -* -* If unsure, you'd better to take this alternative. -* -* The reason why we need to take into account "tf" here, -* is the same as described in i2c_dw_scl_lcnt(). -*/ -return DIV_ROUND_CLOSEST_ULL ((u64 )ic_clk * (tSYMBOL + tf),MICRO ) - -3 + offset; +return DIV_ROUND_CLOSEST_ULL ((u64 )ic_clk * (tSYMBOL + tf),MICRO ) -3 + offset; } u32 i2c_dw_scl_lcnt(struct dw_i2c_dev *dev, unsigned int reg, u32 ic_clk,
@@ -467,8 +446,7 @@ u32 i2c_dw_scl_lcnt(struct dw_i2c_dev *dev, unsigned int reg, u32 ic_clk,* account the fall time of SCL signal (tf). Default tf value * should be 0.3 us, for safety. */ -return DIV_ROUND_CLOSEST_ULL ((u64 )ic_clk * (tLOW + tf),MICRO ) - -1 + offset; +return DIV_ROUND_CLOSEST_ULL ((u64 )ic_clk * (tLOW + tf),MICRO ) -1 + offset; }int i2c_dw_set_sda_hold (struct dw_i2c_dev *dev)
drivers/i2c/busses/i2c-designware-core.h +1 -1
@@ -328,7 +328,7 @@ struct i2c_dw_semaphore_callbacks {int i2c_dw_init_regmap (struct dw_i2c_dev *dev);u32 i2c_dw_scl_hcnt (struct dw_i2c_dev *dev,unsigned int reg,u32 ic_clk, -u32 tSYMBOL,u32 tf,int cond,int offset); +u32 tSYMBOL,u32 tf,int offset);u32 i2c_dw_scl_lcnt (struct dw_i2c_dev *dev,unsigned int reg,u32 ic_clk,u32 tLOW,u32 tf,int offset);int i2c_dw_set_sda_hold (struct dw_i2c_dev *dev);
drivers/i2c/busses/i2c-designware-master.c +0 -4
@@ -71,7 +71,6 @@ static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev) ic_clk,4000 ,/* tHD;STA = tHIGH = 4.0 us */ sda_falling_time, -0 ,/* 0: DW default, 1: Ideal */ 0); /* No offset */ dev->ss_lcnt = i2c_dw_scl_lcnt(dev,
@@ -105,7 +104,6 @@ static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev) ic_clk,260 ,/* tHIGH = 260 ns */ sda_falling_time, -0 ,/* DW default */ 0); /* No offset */ dev->fs_lcnt = i2c_dw_scl_lcnt(dev,
@@ -129,7 +127,6 @@ static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev) ic_clk,600 ,/* tHD;STA = tHIGH = 0.6 us */ sda_falling_time, -0 ,/* 0: DW default, 1: Ideal */ 0); /* No offset */ dev->fs_lcnt = i2c_dw_scl_lcnt(dev,
@@ -161,7 +158,6 @@ static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev) ic_clk,160 ,/* tHIGH = 160 ns */ sda_falling_time, -0 ,/* DW default */ 0); /* No offset */ dev->hs_lcnt = i2c_dw_scl_lcnt(dev,
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Andy Shevchenko
reviewerPATCH 4/5 i2c: designware: Use sda_hold_time variable name everywhere
In reply to Andy ShevchenkoCurrently the PCI glue driver uses sda_hold variable name, while the rest of the driver use sda_hold_time. This makes things harder to grep. Use sda_hold_time variable name everywhere.
--- drivers/i2c/busses/i2c-designware-pcidrv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/i2c/busses/i2c-designware-pcidrv.c +5 -5
@@ -51,7 +51,7 @@ struct dw_scl_sda_cfg {u16 fs_hcnt;u16 ss_lcnt;u16 fs_lcnt; -u32 sda_hold; +u32 sda_hold_time; };struct dw_pci_controller {
@@ -76,7 +76,7 @@ static struct dw_scl_sda_cfg byt_config = { .fs_hcnt = 0x55, .ss_lcnt = 0x200, .fs_lcnt = 0x99, - .sda_hold = 0x6, + .sda_hold_time = 0x6, };/* Haswell HCNT/LCNT/SDA hold time */
@@ -85,14 +85,14 @@ static struct dw_scl_sda_cfg hsw_config = { .fs_hcnt = 0x48, .ss_lcnt = 0x01fb, .fs_lcnt = 0xa0, - .sda_hold = 0x9, + .sda_hold_time = 0x9, };/* NAVI-AMD HCNT/LCNT/SDA hold time */ static struct dw_scl_sda_cfg navi_amd_config = { .ss_hcnt =0x1ae , .ss_lcnt =0x23a , - .sda_hold =0x9 , + .sda_hold_time =0x9 , };static u32 mfld_get_clk_rate_khz (struct dw_i2c_dev *dev)
@@ -264,7 +264,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, dev->fs_hcnt = cfg->fs_hcnt; dev->ss_lcnt = cfg->ss_lcnt; dev->fs_lcnt = cfg->fs_lcnt; - dev->sda_hold_time = cfg->sda_hold; + dev->sda_hold_time = cfg->sda_hold_time; } adap = &dev->adapter;
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Andy Shevchenko
reviewerPATCH 5/5 i2c: designware: Fix spelling and other issues in the comments
In reply to Andy ShevchenkoFix spelling and other issues, such as kernel-doc reported about, in the comments. While at it, fix some indentation issues as well.
--- drivers/i2c/busses/i2c-designware-amdpsp.c | 10 +++++----- drivers/i2c/busses/i2c-designware-common.c | 8 +++++--- drivers/i2c/busses/i2c-designware-core.h | 10 +++++----- drivers/i2c/busses/i2c-designware-master.c | 13 ++++++++----- drivers/i2c/busses/i2c-designware-platdrv.c | 4 ++-- drivers/i2c/busses/i2c-designware-slave.c | 6 ++++-- 6 files changed, 29 insertions(+), 22 deletions(-)
drivers/i2c/busses/i2c-designware-amdpsp.c +5 -5
@@ -155,7 +155,7 @@ static void psp_release_i2c_bus_deferred(struct work_struct *work)/* * If there is any pending transaction, cannot release the bus here. -* psp_release_i2c_bus will take care of this later. +* psp_release_i2c_bus() will take care of this later. */ if (psp_i2c_access_count) goto cleanup;
@@ -210,12 +210,12 @@ static void psp_release_i2c_bus(void) {mutex_lock (&psp_i2c_access_mutex); -/* Return early if mailbox was malfunctional */ +/* Return early if mailbox was malfunctioned */ if (psp_i2c_mbox_fail) goto cleanup;/* -* If we are last owner of PSP semaphore, need to release aribtration +* If we are last owner of PSP semaphore, need to release arbitration * via mailbox. */ psp_i2c_access_count--;
@@ -235,9 +235,9 @@ static void psp_release_i2c_bus(void)/* * Locking methods are based on the default implementation from -* drivers/i2c/i2c-core-base.c, but with psp acquire and release operations +* drivers/i2c/i2c-core-base.c, but with PSP acquire and release operations * added. With this in place we can ensure that i2c clients on the bus shared -* with psp are able to lock HW access to the bus for arbitrary number of +* with PSP are able to lock HW access to the bus for arbitrary number of * operations - that is e.g. write-wait-read. */ static void i2c_adapter_dw_psp_lock_bus(struct i2c_adapter *adapter,
drivers/i2c/busses/i2c-designware-common.c +5 -3
@@ -127,6 +127,8 @@ static int dw_reg_write_word(void *context, unsigned int reg, unsigned int val)* Autodetects needed register access mode and creates the regmap with * corresponding read/write callbacks. This must be called before doing any * other register access. +* +* Return: 0 on success, or negative errno otherwise. */ int i2c_dw_init_regmap (struct dw_i2c_dev *dev) {
@@ -174,7 +176,7 @@ int i2c_dw_init_regmap(struct dw_i2c_dev *dev)/* * Note we'll check the return value of the regmap IO accessors only * at the probe stage. The rest of the code won't do this because -* basically we have MMIO-based regmap so non of the read/write methods +* basically we have MMIO-based regmap, so none of the read/write methods * can fail. */ dev->map =devm_regmap_init (dev->dev,NULL , dev, &map_cfg);
@@ -336,7 +338,7 @@ static u32 i2c_dw_acpi_round_bus_speed(struct device *device) acpi_speed =i2c_acpi_find_bus_speed (device);/* -* Some DSTDs use a non standard speed, round down to the lowest +* Some DSDTs use a non standard speed, round down to the lowest * standard speed. */ for (i =0 ; i <ARRAY_SIZE (supported_speeds); i++) {
@@ -547,7 +549,7 @@ void __i2c_dw_disable(struct dw_i2c_dev *dev)/* * Wait 10 times the signaling period of the highest I2C -* transfer supported by the driver (for 400KHz this is +* transfer supported by the driver (for 400kHz this is * 25us) as described in the DesignWare I2C databook. */ usleep_range (25 ,250 );
drivers/i2c/busses/i2c-designware-core.h +5 -5
@@ -142,10 +142,10 @@#define DW_IC_SLAVE 1/* -* Hardware abort codes from the DW_IC_TX_ABRT_SOURCE register +* Hardware abort codes from the DW_IC_TX_ABRT_SOURCE register. * -* Only expected abort codes are listed here -* refer to the datasheet for the full list +* Only expected abort codes are listed here, +* refer to the datasheet for the full list. */ #define ABRT_7B_ADDR_NOACK 0#define ABRT_10ADDR1_NOACK 1
@@ -200,7 +200,7 @@ struct reset_control;* @rst: optional reset for the controller * @slave: represent an I2C slave device * @get_clk_rate_khz: callback to retrieve IP specific bus speed -* @cmd_err: run time hadware error code +* @cmd_err: run time hardware error code * @msgs: points to an array of messages currently being transferred * @msgs_num: the number of elements in msgs * @msg_write_idx: the element index of the current tx message in the msgs array
@@ -236,7 +236,7 @@ struct reset_control;* @release_lock: function to release a hardware lock on the bus * @semaphore_idx: Index of table with semaphore type attached to the bus. It's * -1 if there is no semaphore. -* @shared_with_punit: true if this bus is shared with the SoCs PUNIT +* @shared_with_punit: true if this bus is shared with the SoC's PUNIT * @init: function to initialize the I2C hardware * @set_sda_hold_time: callback to retrieve IP specific SDA hold timing * @mode: operation mode - DW_IC_MASTER or DW_IC_SLAVE
drivers/i2c/busses/i2c-designware-master.c +8 -5
@@ -180,12 +180,14 @@ static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev) }/** -* i2c_dw_init_master() - Initialize the designware I2C master hardware +* i2c_dw_init_master() - Initialize the DesignWare I2C master hardware * @dev: device private data * * This functions configures and enables the I2C master. * This function is called during I2C init function, and in case of timeout at * run time. +* +* Return: 0 on success, or negative errno otherwise. */ static int i2c_dw_init_master (struct dw_i2c_dev *dev) {
@@ -353,7 +355,7 @@ static int amd_i2c_dw_xfer_quirk(struct i2c_adapter *adap, struct i2c_msg *msgs,/* * Initiate the i2c read/write transaction of buffer length, * and poll for bus busy status. For the last message transfer, -* update the command with stopbit enable. +* update the command with stop bit enable. */ for (msg_itr_lmt = buf_len; msg_itr_lmt >0 ; msg_itr_lmt--) {if (msg_wrt_idx == num_msgs -1 && msg_itr_lmt ==1 )
@@ -398,7 +400,7 @@ static int amd_i2c_dw_xfer_quirk(struct i2c_adapter *adap, struct i2c_msg *msgs,/* * Initiate (and continue) low level master read/write transaction. -* This function is only called from i2c_dw_isr, and pumping i2c_msg +* This function is only called from i2c_dw_isr(), and pumping i2c_msg * messages into the tx buffer. Even if the size of i2c_msg data is * longer than the size of the tx buffer, it handles everything. */
@@ -436,7 +438,8 @@ i2c_dw_xfer_msg(struct dw_i2c_dev *dev) buf = msgs[dev->msg_write_idx].buf; buf_len = msgs[dev->msg_write_idx].len; -/* If both IC_EMPTYFIFO_HOLD_MASTER_EN and +/* +* If both IC_EMPTYFIFO_HOLD_MASTER_EN and * IC_RESTART_EN are set, we must manually * set restart bit between messages. */
@@ -967,7 +970,7 @@ static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev) rinfo->unprepare_recovery = i2c_dw_unprepare_recovery; adap->bus_recovery_info = rinfo; -dev_info (dev->dev,"running with gpio recovery mode! scl%s" , +dev_info (dev->dev,"running with GPIO recovery mode! scl%s" , rinfo->sda_gpiod ?",sda" :"" );return 0 ;
drivers/i2c/busses/i2c-designware-platdrv.c +2 -2
@@ -72,7 +72,7 @@ static int bt1_i2c_write(void *context, unsigned int reg, unsigned int val)return ret;return regmap_write (dev->sysmap,BT1_I2C_CTL , -BT1_I2C_CTL_GO |BT1_I2C_CTL_WR | (reg &BT1_I2C_CTL_ADDR_MASK )); +BT1_I2C_CTL_GO |BT1_I2C_CTL_WR | (reg &BT1_I2C_CTL_ADDR_MASK )); }static const struct regmap_config bt1_i2c_cfg = {
@@ -278,7 +278,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) adap = &dev->adapter; adap->owner =THIS_MODULE ; adap->class =dmi_check_system (dw_i2c_hwmon_class_dmi) ? -I2C_CLASS_HWMON :I2C_CLASS_DEPRECATED ; +I2C_CLASS_HWMON :I2C_CLASS_DEPRECATED ; adap->nr =-1 ;if (dev->flags &ACCESS_NO_IRQ_SUSPEND )
drivers/i2c/busses/i2c-designware-slave.c +4 -2
@@ -32,12 +32,14 @@ static void i2c_dw_configure_fifo_slave(struct dw_i2c_dev *dev) }/** -* i2c_dw_init_slave() - Initialize the designware i2c slave hardware +* i2c_dw_init_slave() - Initialize the DesignWare i2c slave hardware * @dev: device private data * * This function configures and enables the I2C in slave mode. * This function is called during I2C init function, and in case of timeout at * run time. +* +* Return: 0 on success, or negative errno otherwise. */ static int i2c_dw_init_slave (struct dw_i2c_dev *dev) {
@@ -264,7 +266,7 @@ int i2c_dw_probe_slave(struct dw_i2c_dev *dev) ret =devm_request_irq (dev->dev, dev->irq, i2c_dw_isr_slave,IRQF_SHARED ,dev_name (dev->dev), dev);if (ret) { -dev_err (dev->dev,"failure requesting irq %i: %d\n" , +dev_err (dev->dev,"failure requesting IRQ %i: %d\n" , dev->irq, ret);return ret; }
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Quoted 23 lines · Andy Shevchenko
This is the subset of the patches [1] that should not affect any functionality. Here are:
- tiding up the probe and remove functions
- dead and redundant code removal
- spelling fixesIn any case this is Cc'ed to AMD who reported a problem in [1] presumably in the patch that is *not* included here.
This is assumed to be the last straightforward patch series to clean up the driver. The rest is directly related or dependent on the reported problem and needs more thinking and work. Perhaps I can do it in the future.
Andy Shevchenko (5):
i2c: designware: Use temporary variable for struct device
i2c: designware: Get rid of redundant 'else'
i2c: designware: Remove 'cond' fromi2c_dw_scl_hcnt()
i2c: designware: Usesda_hold_timevariable name everywhere
i2c: designware: Fix spelling and other issues in the comments
Quoted 9 lines
drivers/i2c/busses/i2c-designware-amdpsp.c | 10 ++-- drivers/i2c/busses/i2c-designware-common.c | 66 +++++++-------------- drivers/i2c/busses/i2c-designware-core.h | 12 ++-- drivers/i2c/busses/i2c-designware-master.c | 17 +++--- drivers/i2c/busses/i2c-designware-pcidrv.c | 39 ++++++------ drivers/i2c/busses/i2c-designware-platdrv.c | 52 ++++++++-------- drivers/i2c/busses/i2c-designware-slave.c | 6 +- 7 files changed, 90 insertions(+), 112 deletions(-)
To all:
Hi Andy,
Quoted 6 lines
Andy Shevchenko (5):
i2c: designware: Use temporary variable for struct device
i2c: designware: Get rid of redundant 'else'
i2c: designware: Remove 'cond' fromi2c_dw_scl_hcnt()
i2c: designware: Usesda_hold_timevariable name everywhere
i2c: designware: Fix spelling and other issues in the comments
merged to i2c/i2c-host.
Thanks,
Andi