Thread (31 messages) 31 messages, 4 authors, 2021-09-22

Re: [RFT PATCH 3/9] usb: typec: tipd: Allow irq controller selection

From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Date: 2021-09-21 13:21:18
Also in: lkml

On Sat, Sep 18, 2021 at 02:09:28PM +0200, Sven Peter wrote:
TI TPS6598x chips come with two separate i2c buses which each have an
independent interrupt controller. When only a single controller is
connected both can just be used.
On Apple M1 machines the secondary bus is however connected to the system
management controller and we must not modify its configuration. Prepare
for that by allowing to chose which interrupt controller(s) are used.
This is good, but...
quoted hunk ↗ jump to hunk
Signed-off-by: Sven Peter <redacted>
---
 drivers/usb/typec/tipd/core.c | 30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 656020e7f533..c2c399722c37 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -78,6 +78,8 @@ static const char *const modes[] = {
 #define INVALID_CMD(_cmd_)		(_cmd_ == 0x444d4321)
 
 struct tps6598x_hw {
+	bool use_int1;
+	bool use_int2;
 };
Wouldn't it be better to read that information from a device
property/properties?

Driver data is OK, but device property would be better. We don't have
separate compatible for this on every board that uses it and we have
also ACPI platforms.

thanks,

-- 
heikki
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help