Re: [PATCH v2 8/9] Input: iqs5xx - make reset GPIO optional
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2021-03-22 04:08:01
Also in:
linux-devicetree
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2021-03-22 04:08:01
Also in:
linux-devicetree
Hi Jeff, On Sat, Mar 13, 2021 at 01:12:35PM -0600, Jeff LaBundy wrote:
@@ -989,7 +993,11 @@ static int iqs5xx_probe(struct i2c_client *client, return error; } - error = devm_device_add_group(&client->dev, &iqs5xx_attr_group); + if (iqs5xx->reset_gpio && + iqs5xx->dev_id_info.bl_status != IQS5XX_BL_STATUS_NONE) + attr_group = &iqs5xx_attr_group_bl;
I would prefer if we defined is_visible for the attribute instead of conditional registration.
+
+ error = devm_device_add_group(&client->dev, attr_group);
if (error) {
dev_err(&client->dev, "Failed to add attributes: %d\n", error);
return error;
--
2.17.1Thanks. -- Dmitry