Skip to content

Commit 51e8ce3

Browse files
Heikki KrogerusAndi Shyti
authored andcommitted
i2c: designware: Remove an unnecessary condition
Writing also the high speed timing registers unconditionally. The reset value for these registers is 0, so this should always be safe. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20260120130729.1679560-5-heikki.krogerus@linux.intel.com
1 parent cfbcc20 commit 51e8ce3

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -392,11 +392,9 @@ static void i2c_dw_write_timings(struct dw_i2c_dev *dev)
392392
regmap_write(dev->map, DW_IC_FS_SCL_HCNT, dev->fs_hcnt);
393393
regmap_write(dev->map, DW_IC_FS_SCL_LCNT, dev->fs_lcnt);
394394

395-
/* Write high speed timing parameters if supported */
396-
if (dev->hs_hcnt && dev->hs_lcnt) {
397-
regmap_write(dev->map, DW_IC_HS_SCL_HCNT, dev->hs_hcnt);
398-
regmap_write(dev->map, DW_IC_HS_SCL_LCNT, dev->hs_lcnt);
399-
}
395+
/* Write high speed timing parameters */
396+
regmap_write(dev->map, DW_IC_HS_SCL_HCNT, dev->hs_hcnt);
397+
regmap_write(dev->map, DW_IC_HS_SCL_LCNT, dev->hs_lcnt);
400398
}
401399

402400
/**

0 commit comments

Comments
 (0)