Message ID | 20240206145158.227254-2-jarkko.nikula@linux.intel.com |
---|---|
State | New |
Headers | show |
Series | [v2,1/9] i2c: designware: Add some flexiblity to the model info | expand |
On Tue, Feb 06, 2024 at 04:51:50PM +0200, Jarkko Nikula wrote: > From: "Michael J. Ruhl" <michael.j.ruhl@intel.com> > > Currently the way to identify a model is via a bit field, of which > 4 bits are currently defined. > > Use a shifted value to that more models can be defined. > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> While this is true review, internally we're still discussing the possibility of moving to plain numbers and shift, so we may add arrays which are indexed in model-based way.
On 2/6/24 17:30, Andy Shevchenko wrote: > On Tue, Feb 06, 2024 at 04:51:50PM +0200, Jarkko Nikula wrote: >> From: "Michael J. Ruhl" <michael.j.ruhl@intel.com> >> >> Currently the way to identify a model is via a bit field, of which >> 4 bits are currently defined. >> >> Use a shifted value to that more models can be defined. > >> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> >> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > While this is true review, internally we're still discussing > the possibility of moving to plain numbers and shift, so we > may add arrays which are indexed in model-based way. > I was thinking I'll drop these first 3 patches in the next version and go back to v1 version. IMHO it's better this patchset to focus implementing generic polling only and not mix with cleaning up the semaphore or other random stuff. So planning to go back to v1 version and take your notes for v2 7/9 and 9/9. What would you think?
On Fri, Feb 09, 2024 at 04:14:37PM +0200, Jarkko Nikula wrote: > On 2/6/24 17:30, Andy Shevchenko wrote: ... > I was thinking I'll drop these first 3 patches in the next version and go > back to v1 version. IMHO it's better this patchset to focus implementing > generic polling only and not mix with cleaning up the semaphore or other > random stuff. > > So planning to go back to v1 version and take your notes for v2 7/9 and 9/9. > What would you think? I'm fine with that.
diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h index a7f6f3eafad7..4e1f0924f493 100644 --- a/drivers/i2c/busses/i2c-designware-core.h +++ b/drivers/i2c/busses/i2c-designware-core.h @@ -304,10 +304,10 @@ struct dw_i2c_dev { #define ACCESS_NO_IRQ_SUSPEND BIT(1) #define ARBITRATION_SEMAPHORE BIT(2) -#define MODEL_MSCC_OCELOT BIT(8) -#define MODEL_BAIKAL_BT1 BIT(9) -#define MODEL_AMD_NAVI_GPU BIT(10) -#define MODEL_WANGXUN_SP BIT(11) +#define MODEL_MSCC_OCELOT (1 << 8) +#define MODEL_BAIKAL_BT1 (2 << 8) +#define MODEL_AMD_NAVI_GPU (3 << 8) +#define MODEL_WANGXUN_SP (4 << 8) #define MODEL_MASK GENMASK(11, 8) /*