[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220826084001.3341215-3-badhri@google.com>
Date: Fri, 26 Aug 2022 01:40:00 -0700
From: Badhri Jagan Sridharan <badhri@...gle.com>
To: Guenter Roeck <linux@...ck-us.net>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Kyle Tso <kyletso@...gle.com>,
Badhri Jagan Sridharan <badhri@...gle.com>
Subject: [PATCH v1 3/4] usb: typec: tcpci_maxim: Export helper function for
register reads
Signed-off-by: Badhri Jagan Sridharan <badhri@...gle.com>
---
drivers/usb/typec/tcpm/tcpci_maxim.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/typec/tcpm/tcpci_maxim.c b/drivers/usb/typec/tcpm/tcpci_maxim.c
index 4b6705f3d7b7..af3a7ecab23b 100644
--- a/drivers/usb/typec/tcpm/tcpci_maxim.c
+++ b/drivers/usb/typec/tcpm/tcpci_maxim.c
@@ -68,25 +68,29 @@ static struct max_tcpci_chip *tdata_to_max_tcpci(struct tcpci_data *tdata)
return container_of(tdata, struct max_tcpci_chip, data);
}
-static int max_tcpci_read16(struct max_tcpci_chip *chip, unsigned int reg, u16 *val)
+inline int max_tcpci_read16(struct max_tcpci_chip *chip, unsigned int reg, u16 *val)
{
return regmap_raw_read(chip->data.regmap, reg, val, sizeof(u16));
}
+EXPORT_SYMBOL_GPL(max_tcpci_read16);
-static int max_tcpci_write16(struct max_tcpci_chip *chip, unsigned int reg, u16 val)
+inline int max_tcpci_write16(struct max_tcpci_chip *chip, unsigned int reg, u16 val)
{
return regmap_raw_write(chip->data.regmap, reg, &val, sizeof(u16));
}
+EXPORT_SYMBOL_GPL(max_tcpci_write16);
-static int max_tcpci_read8(struct max_tcpci_chip *chip, unsigned int reg, u8 *val)
+inline int max_tcpci_read8(struct max_tcpci_chip *chip, unsigned int reg, u8 *val)
{
return regmap_raw_read(chip->data.regmap, reg, val, sizeof(u8));
}
+EXPORT_SYMBOL_GPL(max_tcpci_read8);
-static int max_tcpci_write8(struct max_tcpci_chip *chip, unsigned int reg, u8 val)
+inline int max_tcpci_write8(struct max_tcpci_chip *chip, unsigned int reg, u8 val)
{
return regmap_raw_write(chip->data.regmap, reg, &val, sizeof(u8));
}
+EXPORT_SYMBOL_GPL(max_tcpci_write8);
static void max_tcpci_init_regs(struct max_tcpci_chip *chip)
{
--
2.37.2.672.g94769d06f0-goog
Powered by blists - more mailing lists