#include <linux/delay.h>
#include <linux/firmware.h>
+#include <linux/gpio/consumer.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
static const char * const regulators[] = { "vdd", "vdda" };
struct pd692x0_msg msg, buf = {0}, zero = {0};
struct device *dev = &client->dev;
+ struct gpio_desc *disable_ports;
struct pd692x0_msg_ver ver;
struct pd692x0_priv *priv;
struct fw_upload *fwl;
priv->client = client;
i2c_set_clientdata(client, priv);
+ disable_ports = devm_gpiod_get_optional(dev, "disable-ports", GPIOD_OUT_LOW);
+ if (IS_ERR(disable_ports))
+ return dev_err_probe(&client->dev, PTR_ERR(disable_ports),
+ "Failed to get disable ports GPIO\n");
+
ret = i2c_master_recv(client, (u8 *)&buf, sizeof(buf));
if (ret != sizeof(buf)) {
dev_err(dev, "Failed to get device status\n");