Re: [PATCH 2/2] hwmon: pmbus: adp1050 : Add driver support

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

 



On 18/03/2024 17:48, Guenter Roeck wrote:
> 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.

I did not explain the arguments, because they are obvious... but if you
need so:

return dev_err_probe(&client->dev, ret, "Device can't be unlocked.\n");

Best regards,
Krzysztof





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux