Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4fde779 authored by Umang Agrawal's avatar Umang Agrawal Committed by Guru Das Srinagesh
Browse files

power: smb5: Clean up temperature iio channels



Add support to de-initialize the iio channels used for reading
temperature.

Change-Id: Ie5ae76f135e52e7736d723927e39d6c346161882
Signed-off-by: default avatarUmang Agrawal <uagrawal@codeaurora.org>
parent 0d5cbba6
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -5698,6 +5698,14 @@ static void smblib_iio_deinit(struct smb_charger *chg)
		iio_channel_release(chg->iio.sbux_chan);
	if (!IS_ERR_OR_NULL(chg->iio.vph_v_chan))
		iio_channel_release(chg->iio.vph_v_chan);
	if (!IS_ERR_OR_NULL(chg->iio.die_temp_chan))
		iio_channel_release(chg->iio.die_temp_chan);
	if (!IS_ERR_OR_NULL(chg->iio.connector_temp_chan))
		iio_channel_release(chg->iio.connector_temp_chan);
	if (!IS_ERR_OR_NULL(chg->iio.skin_temp_chan))
		iio_channel_release(chg->iio.skin_temp_chan);
	if (!IS_ERR_OR_NULL(chg->iio.smb_temp_chan))
		iio_channel_release(chg->iio.smb_temp_chan);
}

int smblib_init(struct smb_charger *chg)