lkml.org 
[lkml]   [2013]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [tpmdd-devel] [PATCH v2] tpm: Add support for new Infineon I2C TPM (SLB 9645 TT 1.2 I2C)
>> >
>> > +
>> > +#ifdef CONFIG_OF
>> > +static const struct of_device_id tpm_tis_i2c_of_match[] = {
>> > + { .compatible = "infineon,tpm_i2c_infineon", .data = (void *)0 },
>> > + { .compatible = "infineon,slb9635tt", .data = (void *)0 },
>> > + { .compatible = "infineon,slb9645tt", .data = (void *)1 },
>>
>> Here "name" and "type" are left empty in of_device_id. Will there be
>> times when those are needed? Like informational messages from the OF
>> subsystem?
>
> Hmm, what do you propose?
> name = chip type ? or name = tpm_i2c_infineon?
> type = tpm ?

Doesn't matter to me, I just wanted to be sure you hadn't missed anything.

>> > + .of_match_table = of_match_ptr(tpm_tis_i2c_of_match),
>>
>> Please put this line inside an ifdef CONFIG_OF, since of_match_ptr
>> lives in there.
> NACK.
> of.h has already the ifdef CONFIG_OF for of_match_ptr and defines it either as
>
> #define of_match_ptr(_ptr) (_ptr)
> or
> #define of_match_ptr(_ptr) NULL
> depending on CONFIG_OF is set.

Thanks.

>> Won't you also need to add OF to Kconfig?
> Not really, as the only stuff we're using is the compatible id - the driver can
> live without it and can be probed from userspace or plain old platform data.
> I probably have compile tested it with and without CONFIG_OF.

Ok.

> Is it worth a v3?
> or a small update patch which adds the of name/type and the space? (I can
> create this patch immediately)

Not a problem, I can apply as-is with the fixup.

Kent

>
> Thanks,
> Peter
>
>
>


\
 
 \ /
  Last update: 2013-03-04 22:03    [W:0.786 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site