On 2023-01-19 11:36, Sumit Garg wrote:
On Mon, 16 Jan 2023 at 06:03, Alexey Minnekhanov
wrote:
...
- config_addr = dev_read_addr_index(dev, 0);
- priv->spmi_core = dev_read_addr_index(dev, 1);
- priv->spmi_obs = dev_read_addr_index(dev, 2);
+ /* DTS bindings: reg-names
On Mon, 16 Jan 2023 at 06:03, Alexey Minnekhanov
wrote:
>
> First of all, use dev_read_addr_name() instead of
> dev_read_addr_index() to avoid confusion: most dts files
> have their regs specified in the wrong order, so driver
> is reading config reg and using it instead of core reg.
> Using names
First of all, use dev_read_addr_name() instead of
dev_read_addr_index() to avoid confusion: most dts files
have their regs specified in the wrong order, so driver
is reading config reg and using it instead of core reg.
Using names instead of indexes helps to avoid such errors.
Second, same as Linu
3 matches
Mail list logo