max1363: internal reference
A message that is not in the archive (sent off-list or not yet received): 235056967.112251.1389282903427.JavaMail.root@mail
Hi Jonathan,
As described in the max1363.c header, the control of the internal reference is not currently supported by the driver.
We have two max11603 and max11605 which need this option. We currently use a monkey patch like this in max1363.c:
@@ -1414,7 +1414,12 @@ static const struct max1363_chip_info ma
static int max1363_initial_setup(struct max1363_state *st)
{
+#ifdef OUR_BOARD
+ st->setupbyte = MAX1363_SETUP_AIN3_IS_AIN3_REF_IS_INT
+#else
st->setupbyte = MAX1363_SETUP_AIN3_IS_AIN3_REF_IS_VDD
+#endif
| MAX1363_SETUP_POWER_UP_INT_REF
| MAX1363_SETUP_INT_CLOCK
| MAX1363_SETUP_UNIPOLARIn order to add the support for this, I would suggest adding a platform_data for this driver such as:
struct max1363_platform_data {
bool internal_reference;
};What do you think?
Best,
Vivien
Quoted 20 lines · Vivien Didelot
Hi Jonathan,
As described in the
max1363.cheader, the control of the internal reference is not currently supported by the driver.We have two max11603 and max11605 which need this option. We currently use a monkey patch like this in
max1363.c:@@ -1414,7 +1414,12 @@ static const struct max1363_chip_info ma static int max1363_initial_setup(struct max1363_state *st) { +#ifdef OUR_BOARD + st->setupbyte = MAX1363_SETUP_AIN3_IS_AIN3_REF_IS_INT +#else st->setupbyte = MAX1363_SETUP_AIN3_IS_AIN3_REF_IS_VDD +#endif | MAX1363_SETUP_POWER_UP_INT_REF | MAX1363_SETUP_INT_CLOCK | MAX1363_SETUP_UNIPOLAR
Quoted 8 lines
In order to add the support for this, I would suggest adding a
platform_datafor this driver such as:struct max1363_platform_data { bool internal_reference; };What do you think?
Yes. But make sure to properly document the platform data struct with kernel doc.
- Lars
My bad, since a405b00 external reference is supported if the device has a regulator, and fallback to internal if it doesn't.
Best,
Vivien
----- Mail original -----
Quoted 3 lines
De: "Lars-Peter Clausen" <[email protected]>
=C3=80: "Vivien Didelot" <[email protected]>
Cc: "Jonathan Cameron" <[email protected]>, [email protected], ker=
Quoted 40 lines
Envoy=C3=A9: Vendredi 10 Janvier 2014 04:27:43
Objet: Re: max1363: internal reference
=20Quoted 24 lines · Vivien Didelot
Hi Jonathan,
=20
As described in themax1363.cheader, the control of the internal reference is not currently supported by the driver.
=20
We have two max11603 and max11605 which need this option. We currently
use a monkey patch like this inmax1363.c:
=20@@ -1414,7 +1414,12 @@ static const struct max1363_chip_info ma static int max1363_initial_setup(struct max1363_state *st) { +#ifdef OUR_BOARD + st->setupbyte =3D MAX1363_SETUP_AIN3_IS_AIN3_REF_IS_INT +#else st->setupbyte =3D MAX1363_SETUP_AIN3_IS_AIN3_REF_IS_VDD +#endif | MAX1363_SETUP_POWER_UP_INT_REF | MAX1363_SETUP_INT_CLOCK | MAX1363_SETUP_UNIPOLAR=20
In order to add the support for this, I would suggest adding aplatform_datafor this driver such as:
=20Quoted 5 lines
struct max1363_platform_data { bool internal_reference; };=20
What do you think?=20
Yes. But make sure to properly document the platform data struct with kernel
doc.
=20
- Lars
=20