lkml.org 
[lkml]   [2017]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] extcon: max77843: support USB accessories as external USB hosts
Hi Krzysztof,

> > + case MAX77843_MUIC_ADC_RESERVED_ACC_1:
> > + case MAX77843_MUIC_ADC_RESERVED_ACC_2:
> > + case MAX77843_MUIC_ADC_RESERVED_ACC_3:
> > + case MAX77843_MUIC_ADC_RESERVED_ACC_4:
> > + case MAX77843_MUIC_ADC_RESERVED_ACC_5:
>
> In commit msg you mentioned it but in code not. It looks weird to
> handle a vague "reserved" type in a specific way. How about adding
> some meaningful names instead of "reserved"? Or at least documenting,
> that they match Gear VR. Really, imagine later one would be looking at
> the code and trying to figure out why "reserved" means something

I know it's misleading, but that's the name from the datasheet,
that's why I tried to be more specific in the commit log.

In any case RESERVED_ACC stands for "reserved for external
accessory".

The Gear VR corresponds to MAX77843_MUIC_ADC_RESERVED_ACC_4, but
I don't think it's the only one, that's why it wouldn't be right
to call it e.g. MAX77843_MUIC_ADC_GEAR_VR.

I can of course add a comment on top of the above lines to make
it clearer.

Thanks,
Andi

\
 
 \ /
  Last update: 2017-03-29 17:00    [W:2.723 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site