RE: [PATCH v2 2/2] gpio: mlxbf3: Support add_pin_ranges()

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

 



> > I would like to get the gpio block id which can only be 0 or 1 on BlueField-3
> (only 2 gpio blocks, one with 32 gpio pins and one with 24 gpio pins).
> > The above logic was an "easy" way for me to get the gpio block id. Then the
> pin_base for each gpio block is:
> > pin_base = id * MLXBF3_GPIO_MAX_PINS_PER_BLOCK
> 
> It's fragile. Use a direct case switch for that, which will be more explicit and
> robust (however still can fail for any new chip revision/version where it might
> be a different GPIO layout).
> 
Thanks Andy! Will do. Hopefully it is too late to change the BF3 hardware at this point so we should be good ; ) .




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux