Skip to content

Commit

Permalink
iio: adc: rn5t618: Re-use generic struct u16_fract
Browse files Browse the repository at this point in the history
Instead of custom data type re-use generic struct u16_fract.
No changes intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220126135353.24007-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Andy Shevchenko authored and Jonathan Cameron committed Jan 30, 2022
1 parent e820a33 commit 84cd574
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/iio/adc/rn5t618-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ struct rn5t618_adc_data {
int irq;
};

struct rn5t618_channel_ratios {
u16 numerator;
u16 denominator;
};

enum rn5t618_channels {
LIMMON = 0,
VBAT,
Expand All @@ -58,7 +53,7 @@ enum rn5t618_channels {
AIN0
};

static const struct rn5t618_channel_ratios rn5t618_ratios[8] = {
static const struct u16_fract rn5t618_ratios[8] = {
[LIMMON] = {50, 32}, /* measured across 20mOhm, amplified by 32 */
[VBAT] = {2, 1},
[VADP] = {3, 1},
Expand Down

0 comments on commit 84cd574

Please sign in to comment.