Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752890Ab3FXQij (ORCPT ); Mon, 24 Jun 2013 12:38:39 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:56549 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750884Ab3FXQih (ORCPT ); Mon, 24 Jun 2013 12:38:37 -0400 Message-ID: <51C875E0.7050702@ti.com> Date: Mon, 24 Jun 2013 12:37:52 -0400 From: Eduardo Valentin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Amit Daniel Kachhap CC: , Zhang Rui , Eduardo Valentin , , , , Kukjin Kim Subject: Re: [PATCH V7 23/30] thermal: exynos: Add thermal configuration data for exynos5440 TMU sensor References: <1372071051-3167-1-git-send-email-amit.daniel@samsung.com> <1372071051-3167-24-git-send-email-amit.daniel@samsung.com> In-Reply-To: <1372071051-3167-24-git-send-email-amit.daniel@samsung.com> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2LXJMPBRUACDBVRQSPFBB" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6209 Lines: 167 ------enig2LXJMPBRUACDBVRQSPFBB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 24-06-2013 06:50, Amit Daniel Kachhap wrote: > This patch adds configuration data for exynos5440 soc. Also register > definations for the controller are added. >=20 > Acked-by: Jonghwa Lee > Acked-by: Kukjin Kim > Signed-off-by: Amit Daniel Kachhap Acked-by: Eduardo Valentin > --- > drivers/thermal/samsung/exynos_tmu.c | 4 ++ > drivers/thermal/samsung/exynos_tmu_data.c | 71 +++++++++++++++++++++= ++++++++ > drivers/thermal/samsung/exynos_tmu_data.h | 7 +++ > 3 files changed, 82 insertions(+), 0 deletions(-) >=20 > diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/sam= sung/exynos_tmu.c > index 6bc86f6..651f460 100644 > --- a/drivers/thermal/samsung/exynos_tmu.c > +++ b/drivers/thermal/samsung/exynos_tmu.c > @@ -456,6 +456,10 @@ static const struct of_device_id exynos_tmu_match[= ] =3D { > .compatible =3D "samsung,exynos5250-tmu", > .data =3D (void *)EXYNOS5250_TMU_DRV_DATA, > }, > + { > + .compatible =3D "samsung,exynos5440-tmu", > + .data =3D (void *)EXYNOS5440_TMU_DRV_DATA, > + }, > {}, > }; > MODULE_DEVICE_TABLE(of, exynos_tmu_match); > diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/therma= l/samsung/exynos_tmu_data.c > index 2612b45..5952915 100644 > --- a/drivers/thermal/samsung/exynos_tmu_data.c > +++ b/drivers/thermal/samsung/exynos_tmu_data.c > @@ -175,3 +175,74 @@ struct exynos_tmu_init_data const exynos5250_defau= lt_tmu_data =3D { > .tmu_count =3D 1, > }; > #endif > + > +#if defined(CONFIG_SOC_EXYNOS5440) > +static const struct exynos_tmu_registers exynos5440_tmu_registers =3D = { > + .triminfo_data =3D EXYNOS5440_TMU_S0_7_TRIM, > + .triminfo_25_shift =3D EXYNOS_TRIMINFO_25_SHIFT, > + .triminfo_85_shift =3D EXYNOS_TRIMINFO_85_SHIFT, > + .tmu_ctrl =3D EXYNOS5440_TMU_S0_7_CTRL, > + .buf_vref_sel_shift =3D EXYNOS_TMU_REF_VOLTAGE_SHIFT, > + .buf_vref_sel_mask =3D EXYNOS_TMU_REF_VOLTAGE_MASK, > + .therm_trip_mode_shift =3D EXYNOS_TMU_TRIP_MODE_SHIFT, > + .therm_trip_mode_mask =3D EXYNOS_TMU_TRIP_MODE_MASK, > + .therm_trip_en_shift =3D EXYNOS_TMU_THERM_TRIP_EN_SHIFT, > + .buf_slope_sel_shift =3D EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT, > + .buf_slope_sel_mask =3D EXYNOS_TMU_BUF_SLOPE_SEL_MASK, > + .core_en_shift =3D EXYNOS_TMU_CORE_EN_SHIFT, > + .tmu_status =3D EXYNOS5440_TMU_S0_7_STATUS, > + .tmu_cur_temp =3D EXYNOS5440_TMU_S0_7_TEMP, > + .threshold_th0 =3D EXYNOS5440_TMU_S0_7_TH0, > + .threshold_th1 =3D EXYNOS5440_TMU_S0_7_TH1, > + .threshold_th2 =3D EXYNOS5440_TMU_S0_7_TH2, > + .threshold_th3_l0_shift =3D EXYNOS5440_TMU_TH_RISE4_SHIFT, > + .tmu_inten =3D EXYNOS5440_TMU_S0_7_IRQEN, > + .inten_rise_mask =3D EXYNOS5440_TMU_RISE_INT_MASK, > + .inten_rise_shift =3D EXYNOS5440_TMU_RISE_INT_SHIFT, > + .inten_fall_mask =3D EXYNOS5440_TMU_FALL_INT_MASK, > + .inten_fall_shift =3D EXYNOS5440_TMU_FALL_INT_SHIFT, > + .inten_rise0_shift =3D EXYNOS5440_TMU_INTEN_RISE0_SHIFT, > + .inten_rise1_shift =3D EXYNOS5440_TMU_INTEN_RISE1_SHIFT, > + .inten_rise2_shift =3D EXYNOS5440_TMU_INTEN_RISE2_SHIFT, > + .inten_rise3_shift =3D EXYNOS5440_TMU_INTEN_RISE3_SHIFT, > + .inten_fall0_shift =3D EXYNOS5440_TMU_INTEN_FALL0_SHIFT, > + .tmu_intstat =3D EXYNOS5440_TMU_S0_7_IRQ, > + .tmu_intclear =3D EXYNOS5440_TMU_S0_7_IRQ, > + .tmu_irqstatus =3D EXYNOS5440_TMU_IRQ_STATUS, > + .emul_con =3D EXYNOS5440_TMU_S0_7_DEBUG, > + .emul_temp_shift =3D EXYNOS_EMUL_DATA_SHIFT, > + .tmu_pmin =3D EXYNOS5440_TMU_PMIN, > +}; > + > +#define EXYNOS5440_TMU_DATA \ > + .trigger_levels[0] =3D 100, \ > + .trigger_levels[4] =3D 105, \ > + .trigger_enable[0] =3D 1, \ > + .trigger_type[0] =3D SW_TRIP, \ > + .trigger_type[4] =3D HW_TRIP, \ > + .max_trigger_level =3D 5, \ > + .gain =3D 5, \ > + .reference_voltage =3D 16, \ > + .noise_cancel_mode =3D 4, \ > + .cal_type =3D TYPE_ONE_POINT_TRIMMING, \ > + .cal_mode =3D 0, \ > + .efuse_value =3D 0x5b2d, \ > + .min_efuse_value =3D 16, \ > + .max_efuse_value =3D 76, \ > + .first_point_trim =3D 25, \ > + .second_point_trim =3D 70, \ > + .default_temp_offset =3D 25, \ > + .type =3D SOC_ARCH_EXYNOS5440, \ > + .registers =3D &exynos5440_tmu_registers, \ > + .features =3D (TMU_SUPPORT_EMULATION | TMU_SUPPORT_FALLING_TRIP | \ > + TMU_SUPPORT_MULTI_INST | TMU_SUPPORT_SHARED_MEMORY), > + > +struct exynos_tmu_init_data const exynos5440_default_tmu_data =3D { > + .tmu_data =3D { > + { EXYNOS5440_TMU_DATA } , > + { EXYNOS5440_TMU_DATA } , > + { EXYNOS5440_TMU_DATA } , > + }, > + .tmu_count =3D 3, > +}; > +#endif > diff --git a/drivers/thermal/samsung/exynos_tmu_data.h b/drivers/therma= l/samsung/exynos_tmu_data.h > index ad263e9..43ce5fb 100644 > --- a/drivers/thermal/samsung/exynos_tmu_data.h > +++ b/drivers/thermal/samsung/exynos_tmu_data.h > @@ -143,4 +143,11 @@ extern struct exynos_tmu_init_data const exynos525= 0_default_tmu_data; > #define EXYNOS5250_TMU_DRV_DATA (NULL) > #endif > =20 > +#if defined(CONFIG_SOC_EXYNOS5440) > +extern struct exynos_tmu_init_data const exynos5440_default_tmu_data; > +#define EXYNOS5440_TMU_DRV_DATA (&exynos5440_default_tmu_data) > +#else > +#define EXYNOS5440_TMU_DRV_DATA (NULL) > +#endif > + > #endif /*_EXYNOS_TMU_DATA_H*/ >=20 --=20 You have got to be excited about what you are doing. (L. Lamport) Eduardo Valentin ------enig2LXJMPBRUACDBVRQSPFBB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iF4EAREIAAYFAlHIdeAACgkQCXcVR3XQvP2P5QD/WWoBvzabqmzBctNzuJW8Q40i 0PPWoJ7/yCKOZx1oI54A/A/m2pgyH9AatRKuK5qORmaN5heMuKPNCCZmIX+Vf8IV =G4zO -----END PGP SIGNATURE----- ------enig2LXJMPBRUACDBVRQSPFBB-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/