2023-07-24 09:40:46

by Komal Bajaj

[permalink] [raw]
Subject: [PATCH v5 3/6] nvmem: core: Add stub for nvmem_cell_read_u8

This change add the stub function for nvmem_cell_read_u8.
This will be helpful when a driver uses this function and
CONFIG_NVMEM is not enabled.

Signed-off-by: Komal Bajaj <[email protected]>
---
include/linux/nvmem-consumer.h | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index fa030d93b768..5c88635d4c2b 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -125,6 +125,12 @@ static inline int nvmem_cell_write(struct nvmem_cell *cell,
return -EOPNOTSUPP;
}

+static inline int nvmem_cell_read_u8(struct device *dev,
+ const char *cell_id, u8 *val)
+{
+ return -EOPNOTSUPP;
+}
+
static inline int nvmem_cell_read_u16(struct device *dev,
const char *cell_id, u16 *val)
{
--
2.40.1



2023-07-24 13:01:41

by Mukesh Ojha

[permalink] [raw]
Subject: Re: [PATCH v5 3/6] nvmem: core: Add stub for nvmem_cell_read_u8



On 7/24/2023 2:11 PM, Komal Bajaj wrote:
> This change add the stub function for nvmem_cell_read_u8.

"Add the stub nvmem_cell_read_u8() function for drivers running with
CONFIG_NVMEM disabled"

-Mukesh

> This will be helpful when a driver uses this function and



-Mukesh

> CONFIG_NVMEM is not enabled.
>
> Signed-off-by: Komal Bajaj <[email protected]>
> ---
> include/linux/nvmem-consumer.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
> index fa030d93b768..5c88635d4c2b 100644
> --- a/include/linux/nvmem-consumer.h
> +++ b/include/linux/nvmem-consumer.h
> @@ -125,6 +125,12 @@ static inline int nvmem_cell_write(struct nvmem_cell *cell,
> return -EOPNOTSUPP;
> }
>
> +static inline int nvmem_cell_read_u8(struct device *dev,
> + const char *cell_id, u8 *val)
> +{
> + return -EOPNOTSUPP;
> +}
> +
> static inline int nvmem_cell_read_u16(struct device *dev,
> const char *cell_id, u16 *val)
> {

2023-08-02 10:15:38

by Komal Bajaj

[permalink] [raw]
Subject: Re: [PATCH v5 3/6] nvmem: core: Add stub for nvmem_cell_read_u8



On 7/24/2023 6:06 PM, Mukesh Ojha wrote:
>
>
> On 7/24/2023 2:11 PM, Komal Bajaj wrote:
>> This change add the stub function for nvmem_cell_read_u8.
>
> "Add the stub nvmem_cell_read_u8() function for drivers running with
> CONFIG_NVMEM disabled"

Okay, will update the commit description.

Thanks
Komal

>
> -Mukesh
>
>> This will be helpful when a driver uses this function and
>
>
>
> -Mukesh
>
>> CONFIG_NVMEM is not enabled.
>>
>> Signed-off-by: Komal Bajaj <[email protected]>
>> ---
>>   include/linux/nvmem-consumer.h | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/include/linux/nvmem-consumer.h
>> b/include/linux/nvmem-consumer.h
>> index fa030d93b768..5c88635d4c2b 100644
>> --- a/include/linux/nvmem-consumer.h
>> +++ b/include/linux/nvmem-consumer.h
>> @@ -125,6 +125,12 @@ static inline int nvmem_cell_write(struct
>> nvmem_cell *cell,
>>       return -EOPNOTSUPP;
>>   }
>>   +static inline int nvmem_cell_read_u8(struct device *dev,
>> +                     const char *cell_id, u8 *val)
>> +{
>> +    return -EOPNOTSUPP;
>> +}
>> +
>>   static inline int nvmem_cell_read_u16(struct device *dev,
>>                         const char *cell_id, u16 *val)
>>   {