iio: adc: meson: add sar adc support for txl
authorXingyu Chen <xingyu.chen@amlogic.com>
Mon, 18 Jun 2018 08:33:34 +0000 (16:33 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Wed, 18 Jul 2018 09:47:36 +0000 (02:47 -0700)
PD#168480: iio: adc: meson: add sar adc support for txl

Change-Id: I9febffdb4fef582f5a91138491ae87d11ca240ee
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
Signed-off-by: Bo Yang <bo.yang@amlogic.com>
Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt
drivers/amlogic/iio/adc/meson_saradc.c

index f41e9453dcfdb6321aaa9aeb5de5987fe201089a..6ab0759067553e9704c4bfed0f7830401adda6ea 100644 (file)
@@ -5,6 +5,7 @@ Required properties:
                        - "amlogic,meson-g12a-saradc" for G12A
                        - "amlogic,meson-txlx-saradc" for TXLX
                        - "amlogic,meson-axg-saradc" for AXG
+                       - "amlogic,meson-txl-saradc" for TXL
                        - "amlogic,meson-gxl-saradc" for GXL
                        - "amlogic,meson-gxm-saradc" for GXM
                        - "amlogic,meson-m8b-saradc" for M8B
index aaa859ed1939311d1dfd3a98bcdf2d5aa8396f5b..dadd27ac7f4987960415ffd3023a3e6dda712907 100644 (file)
@@ -1325,6 +1325,17 @@ struct meson_sar_adc_data meson_sar_adc_axg_data = {
        },
 };
 
+struct meson_sar_adc_data meson_sar_adc_txl_data = {
+       .obt_temp_chan6 = false,
+       .has_bl30_integration = true,
+       .vref_sel = CALIB_VOL_AS_VREF,
+       .resolution = SAR_ADC_12BIT,
+       .name = "meson-txl-saradc",
+       .regs_diff = {
+               .reg3_ring_counter_disable = BIT_HIGH,
+       },
+};
+
 struct meson_sar_adc_data meson_sar_adc_gxl_data = {
        .obt_temp_chan6 = false,
        .has_bl30_integration = true,
@@ -1368,6 +1379,9 @@ static const struct of_device_id meson_sar_adc_of_match[] = {
        }, {
                .compatible = "amlogic,meson-axg-saradc",
                .data = &meson_sar_adc_axg_data,
+       }, {
+               .compatible = "amlogic,meson-txl-saradc",
+               .data = &meson_sar_adc_txl_data,
        }, {
                .compatible = "amlogic,meson-gxl-saradc",
                .data = &meson_sar_adc_gxl_data,