FAILED: patch "[PATCH] iio: pressure: ms5611: fixed value compensation bug" failed to apply to 4.14-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Possible dependencies:
17f442e7e475 ("iio: pressure: ms5611: fixed value compensation bug") dc19fa63ad80 ("iio: ms5611: Simplify IO callback parameters")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 17f442e7e47579d3881fc4d47354eaef09302e6f Mon Sep 17 00:00:00 2001
From: Mitja Spes <[email protected]>
Date: Fri, 21 Oct 2022 15:58:20 +0200
Subject: [PATCH] iio: pressure: ms5611: fixed value compensation bug
When using multiple instances of this driver the compensation PROM was overwritten by the last initialized sensor. Now each sensor has own PROM storage.
drivers/iio/pressure/ms5611.h +4 -8
@@ -25,13 +25,6 @@ enum { MS5607, }; -struct ms5611_chip_info { -u16 prom[MS5611_PROM_WORDS_NB ]; - -int (*temp_and_pressure_compensate)(struct ms5611_chip_info *chip_info, -s32 *temp,s32 *pressure); -}; -/* * OverSampling Rate descriptor. * Warning: cmd MUST be kept aligned on a word boundary (see
@@ -50,12 +43,15 @@ struct ms5611_state {const struct ms5611_osr *pressure_osr;const struct ms5611_osr *temp_osr; +u16 prom[MS5611_PROM_WORDS_NB ]; +int (*reset)(struct ms5611_state *st);int (*read_prom_word)(struct ms5611_state *st,int index,u16 *word);int (*read_adc_temp_and_pressure)(struct ms5611_state *st,s32 *temp,s32 *pressure); -struct ms5611_chip_info *chip_info; +int (*compensate_temp_and_pressure)(struct ms5611_state *st,s32 *temp, +s32 *pressure);struct regulator *vdd; };
drivers/iio/pressure/ms5611_core.c +27 -24
101 lines not on this page · raw message