lkml.org 
[lkml]   [2021]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFT PATCH 3/9] usb: typec: tipd: Allow irq controller selection


On Tue, Sep 21, 2021, at 15:21, Heikki Krogerus wrote:
> 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...
>
>> Signed-off-by: Sven Peter <sven@svenpeter.dev>
>> ---
>> 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.

Good point. Taking into account your review for the later patches I
think I can drop this completely though: On the Apple hardware the
second controller is always connected to the SMC so far. If it's
required later on we can always add the additional property with
a default value then.


Best,


Sven

\
 
 \ /
  Last update: 2021-09-22 16:57    [W:0.053 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site