Re: [PATCH 11/11] i2c: designware: Align defines in i2c-designware-core.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On 10/26/22 16:38, Andy Shevchenko wrote:
On Wed, Oct 26, 2022 at 03:39:12PM +0300, Jarkko Nikula wrote:
Align all defines to the same column.

...

+#define DW_IC_SDA_HOLD_MIN_VERS			0x3131312A

+#define DW_IC_COMP_TYPE_VALUE			0x44570140

While at it, I would add comments that show ASCII values of these definitions.

Yes good idea and I did it in a new followup patch to this.

+#define DW_IC_INTR_DEFAULT_MASK			(DW_IC_INTR_RX_FULL | \
+						 DW_IC_INTR_TX_ABRT | \
+						 DW_IC_INTR_STOP_DET)
+#define DW_IC_INTR_MASTER_MASK			(DW_IC_INTR_DEFAULT_MASK | \
+						 DW_IC_INTR_TX_EMPTY)
+#define DW_IC_INTR_SLAVE_MASK			(DW_IC_INTR_DEFAULT_MASK | \
+						 DW_IC_INTR_RX_UNDER | \
+						 DW_IC_INTR_RD_REQ)

While at it, I would reformat these (and similar below) as

#define DW_IC_INTR_DEFAULT_MASK						\
	(DW_IC_INTR_RX_FULL | DW_IC_INTR_TX_ABRT | DW_IC_INTR_STOP_DET)

I tried this and to me it didn't look as clear than existing so I kept it as before.

-	struct i2c_bus_recovery_info rinfo;
+	struct			i2c_bus_recovery_info rinfo;

...and now this are consistent, but these all are inconsistent with, e.g.

Yeah, this somehow slipped in. Removed this change from v2.

Jarkko




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux