Re: [PATCH 2/2] regulator: adp5055: Add driver for adp5055
From: Mark Brown <broonie@kernel.org>
Date: 2025-02-26 11:35:31
Also in:
lkml
Attachments
- signature.asc [application/pgp-signature] 488 bytes
From: Mark Brown <broonie@kernel.org>
Date: 2025-02-26 11:35:31
Also in:
lkml
On Wed, Feb 26, 2025 at 02:24:58AM +0000, Torreno, Alexis Czezar wrote:
quoted
quoted
+// SPDX-License-Identifier: GPL-2.0 +/* + * Regulator driver for Analog Devices ADP5055 + * + * Copyright (C) 2025 Analog Devices, Inc. + */
quoted
Please make the entire comment block a C++ one so things look more intentional.
Am not familiar with this, is this where each line use // rather than /**/?
Yes.
quoted
quoted
+static int adp5055_en_func(struct regulator_dev *dev, int en_val) { + struct adp5055 *adp5055 = rdev_get_drvdata(dev);
quoted
Just use the standard GPIO and regmap helpers for this.
Confused on this, I thought these were standard 'regmap_update_bits' and 'gpiod_set_value_cansleep'
You've open coded the operations instead of using the framework helpers, you shouldn't need to anything other than supply data here.