lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <8d5937fc-49a5-4556-a3bf-f6c37eaa6942@www.fastmail.com>
Date:   Wed, 22 Sep 2021 16:58:15 +0200
From:   "Sven Peter" <sven@...npeter.dev>
To:     "Heikki Krogerus" <heikki.krogerus@...ux.intel.com>
Cc:     "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        Guido Günther <agx@...xcpu.org>,
        "Bryan O'Donoghue" <bryan.odonoghue@...aro.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        "Hector Martin" <marcan@...can.st>,
        "Mohamed Mediouni" <mohamed.mediouni@...amail.com>,
        "Stan Skowronek" <stan@...ellium.com>,
        "Mark Kettenis" <mark.kettenis@...all.nl>,
        "Alexander Graf" <graf@...zon.com>,
        "Alyssa Rosenzweig" <alyssa@...enzweig.io>
Subject: Re: [RFT PATCH 5/9] usb: typec: tipd: Allow to configure irq bits

Hi,


On Tue, Sep 21, 2021, at 15:34, Heikki Krogerus wrote:
> On Sat, Sep 18, 2021 at 02:09:30PM +0200, Sven Peter wrote:
>> The Apple variant of the TI TPS6598x chip uses different interrupt
>> numbers. Prepare for that by allowing those to be configured depending
>> on the compatible.
>
> OK, so I think this justifies having a completely separate irq
> handler for your board.

OK, If you're fine with a bit of code duplication for the irq handler this will
all be quite a bit simpler then.

>
>> Signed-off-by: Sven Peter <sven@...npeter.dev>
>> ---
>>  drivers/usb/typec/tipd/core.c | 16 ++++++++++++----
>>  1 file changed, 12 insertions(+), 4 deletions(-)
>> 
>> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
>> index 4a6d66250fef..d191e7435018 100644
>> --- a/drivers/usb/typec/tipd/core.c
>> +++ b/drivers/usb/typec/tipd/core.c
>> @@ -80,6 +80,10 @@ static const char *const modes[] = {
>>  struct tps6598x_hw {
>>  	bool use_int1;
>>  	bool use_int2;
>> +	unsigned int irq_power_status_update;
>> +	unsigned int irq_data_status_update;
>> +	unsigned int irq_plug_event;
>> +	void (*irq_trace)(u64 event1, u64 event2);
>>  };
>
> Then I believe you don't need any of that.

Yup, I think I'll really only need something like

struct tps6598x_hw {
	int type;
	irq_handler_t irq_handler;
};

in that case!


Thanks,


Sven

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ