lkml.org 
[lkml]   [2024]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] hwmon: pmbus: adp1050 : Add driver support
From
On 3/18/24 09:12, Krzysztof Kozlowski wrote:
> On 18/03/2024 12:21, Radu Sabau wrote:
>> Add support for ADP1050 Digital Controller for Isolated Power Supplies
>> with PMBus interface Voltage, Current and Temperature Monitor.
>>
>
> ...
>
>> +static int adp1050_probe(struct i2c_client *client)
>> +{
>> + u32 vin_scale_monitor, iin_scale_monitor;
>> + int ret;
>> +
>> + if (!i2c_check_functionality(client->adapter,
>> + I2C_FUNC_SMBUS_WRITE_WORD_DATA))
>> + return -ENODEV;
>> +
>> + /* Unlock CHIP's password in order to be able to read/write to it's
>> + * VIN_SCALE and IIN_SCALE registers.
>> + */
>> + ret = i2c_smbus_write_word_data(client, ADP1050_CHIP_PASSWORD, 0xFFFF);
>> + if (ret < 0) {
>> + dev_err_probe(&client->dev, "Device can't be unlocked.\n");
>
> Syntax is: return dev_err_probe(). Same in other places.
>

dev_err_probe() expects the error number as second parameter, so I don't
really understand how the above even compiles.

Guenter


\
 
 \ /
  Last update: 2024-05-27 15:53    [W:0.074 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site