Re: [PATCH v2 1/3] serial: sh-sci: Add OF support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 26, 2013 at 09:09:52AM -0600, Bastian Hecht wrote:
> 2013/2/25 Paul Mundt <lethal@xxxxxxxxxxxx>:
> > You can then compare against SCIx_PROBE_REGTYPE and SCIx_NR_REGTYPES, and
> > assign p->regtype the be32_to_cpup() value directly. Which will also make
> > it trivial to add new regtypes in the future, we would only need to
> > update the binding documentation.
> 
> Ok, I slightly disliked that portion anyway in the code as we have the
> full mapping from the SCBRR algo ID and only the partial mapping from
> the register set. Additionally I wonder if I should add something like
> 
> enum {
> +     SCBRR_ALGO_INVALID,
>        SCBRR_ALGO_1,
>        SCBRR_ALGO_2,
>        SCBRR_ALGO_3,
>        SCBRR_ALGO_4,
>        SCBRR_ALGO_5,
> };
> ...
> -p->scbrr_algo_id = be32_to_cpup(prop) - 1;
> +p->scbrr_algo_id = be32_to_cpup(prop);
> 
> to have a straight mapping.

Yes, that would be my preferred option as well. I was going to comment on
the - 1 thing previously, but figured it was just some DT oddity.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux