For nvmem providers which have multiple instances, it is required to suffix the provider name with proper id, so that they do not confict for the same name. Currently the core does not handle this case properly eventhough core already has logic to generate the id. This patch add new devid type NVMEM_DEVID_AUTO for providers to be able to allow core to assign id and append it to provier name.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -27,6 +27,9 @@ enum nvmem_type { · 26 unmodified lines | ||
| 27 | 27 | NVMEM_TYPE_BATTERY_BACKED, |
| 28 | 28 | }; |
| 29 | 29 | |
| 30 | +#define NVMEM_DEVID_NONE (-1) | |
| 31 | +#define NVMEM_DEVID_AUTO (-2) | |
| 32 | + | |
| 30 | 33 | /** |
| 31 | 34 | * struct nvmem_config - NVMEM device configuration |
| 32 | 35 | * |