diff options
| author | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
| commit | 1ac731c529cd4d6adbce134754b51ff7d822b145 (patch) | |
| tree | 143ab3f35ca5f3b69f583c84e6964b17139c2ec1 /drivers/misc/lis3lv02d/lis3lv02d.c | |
| parent | 07b4c950f27bef0362dc6ad7ee713aab61d58149 (diff) | |
| parent | 54116d442e001e1b6bd482122043b1870998a1f3 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.6 merge window.
Diffstat (limited to 'drivers/misc/lis3lv02d/lis3lv02d.c')
| -rw-r--r-- | drivers/misc/lis3lv02d/lis3lv02d.c | 66 | 
1 files changed, 33 insertions, 33 deletions
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c index 3a7808b796b1..299d316f1bda 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.c +++ b/drivers/misc/lis3lv02d/lis3lv02d.c @@ -965,19 +965,19 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3)  	if (!pdata)  		return -ENOMEM; -	if (of_get_property(np, "st,click-single-x", NULL)) +	if (of_property_read_bool(np, "st,click-single-x"))  		pdata->click_flags |= LIS3_CLICK_SINGLE_X; -	if (of_get_property(np, "st,click-double-x", NULL)) +	if (of_property_read_bool(np, "st,click-double-x"))  		pdata->click_flags |= LIS3_CLICK_DOUBLE_X; -	if (of_get_property(np, "st,click-single-y", NULL)) +	if (of_property_read_bool(np, "st,click-single-y"))  		pdata->click_flags |= LIS3_CLICK_SINGLE_Y; -	if (of_get_property(np, "st,click-double-y", NULL)) +	if (of_property_read_bool(np, "st,click-double-y"))  		pdata->click_flags |= LIS3_CLICK_DOUBLE_Y; -	if (of_get_property(np, "st,click-single-z", NULL)) +	if (of_property_read_bool(np, "st,click-single-z"))  		pdata->click_flags |= LIS3_CLICK_SINGLE_Z; -	if (of_get_property(np, "st,click-double-z", NULL)) +	if (of_property_read_bool(np, "st,click-double-z"))  		pdata->click_flags |= LIS3_CLICK_DOUBLE_Z;  	if (!of_property_read_u32(np, "st,click-threshold-x", &val)) @@ -994,31 +994,31 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3)  	if (!of_property_read_u32(np, "st,click-window", &val))  		pdata->click_window = val; -	if (of_get_property(np, "st,irq1-disable", NULL)) +	if (of_property_read_bool(np, "st,irq1-disable"))  		pdata->irq_cfg |= LIS3_IRQ1_DISABLE; -	if (of_get_property(np, "st,irq1-ff-wu-1", NULL)) +	if (of_property_read_bool(np, "st,irq1-ff-wu-1"))  		pdata->irq_cfg |= LIS3_IRQ1_FF_WU_1; -	if (of_get_property(np, "st,irq1-ff-wu-2", NULL)) +	if (of_property_read_bool(np, "st,irq1-ff-wu-2"))  		pdata->irq_cfg |= LIS3_IRQ1_FF_WU_2; -	if (of_get_property(np, "st,irq1-data-ready", NULL)) +	if (of_property_read_bool(np, "st,irq1-data-ready"))  		pdata->irq_cfg |= LIS3_IRQ1_DATA_READY; -	if (of_get_property(np, "st,irq1-click", NULL)) +	if (of_property_read_bool(np, "st,irq1-click"))  		pdata->irq_cfg |= LIS3_IRQ1_CLICK; -	if (of_get_property(np, "st,irq2-disable", NULL)) +	if (of_property_read_bool(np, "st,irq2-disable"))  		pdata->irq_cfg |= LIS3_IRQ2_DISABLE; -	if (of_get_property(np, "st,irq2-ff-wu-1", NULL)) +	if (of_property_read_bool(np, "st,irq2-ff-wu-1"))  		pdata->irq_cfg |= LIS3_IRQ2_FF_WU_1; -	if (of_get_property(np, "st,irq2-ff-wu-2", NULL)) +	if (of_property_read_bool(np, "st,irq2-ff-wu-2"))  		pdata->irq_cfg |= LIS3_IRQ2_FF_WU_2; -	if (of_get_property(np, "st,irq2-data-ready", NULL)) +	if (of_property_read_bool(np, "st,irq2-data-ready"))  		pdata->irq_cfg |= LIS3_IRQ2_DATA_READY; -	if (of_get_property(np, "st,irq2-click", NULL)) +	if (of_property_read_bool(np, "st,irq2-click"))  		pdata->irq_cfg |= LIS3_IRQ2_CLICK; -	if (of_get_property(np, "st,irq-open-drain", NULL)) +	if (of_property_read_bool(np, "st,irq-open-drain"))  		pdata->irq_cfg |= LIS3_IRQ_OPEN_DRAIN; -	if (of_get_property(np, "st,irq-active-low", NULL)) +	if (of_property_read_bool(np, "st,irq-active-low"))  		pdata->irq_cfg |= LIS3_IRQ_ACTIVE_LOW;  	if (!of_property_read_u32(np, "st,wu-duration-1", &val)) @@ -1026,32 +1026,32 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3)  	if (!of_property_read_u32(np, "st,wu-duration-2", &val))  		pdata->duration2 = val; -	if (of_get_property(np, "st,wakeup-x-lo", NULL)) +	if (of_property_read_bool(np, "st,wakeup-x-lo"))  		pdata->wakeup_flags |= LIS3_WAKEUP_X_LO; -	if (of_get_property(np, "st,wakeup-x-hi", NULL)) +	if (of_property_read_bool(np, "st,wakeup-x-hi"))  		pdata->wakeup_flags |= LIS3_WAKEUP_X_HI; -	if (of_get_property(np, "st,wakeup-y-lo", NULL)) +	if (of_property_read_bool(np, "st,wakeup-y-lo"))  		pdata->wakeup_flags |= LIS3_WAKEUP_Y_LO; -	if (of_get_property(np, "st,wakeup-y-hi", NULL)) +	if (of_property_read_bool(np, "st,wakeup-y-hi"))  		pdata->wakeup_flags |= LIS3_WAKEUP_Y_HI; -	if (of_get_property(np, "st,wakeup-z-lo", NULL)) +	if (of_property_read_bool(np, "st,wakeup-z-lo"))  		pdata->wakeup_flags |= LIS3_WAKEUP_Z_LO; -	if (of_get_property(np, "st,wakeup-z-hi", NULL)) +	if (of_property_read_bool(np, "st,wakeup-z-hi"))  		pdata->wakeup_flags |= LIS3_WAKEUP_Z_HI;  	if (of_get_property(np, "st,wakeup-threshold", &val))  		pdata->wakeup_thresh = val; -	if (of_get_property(np, "st,wakeup2-x-lo", NULL)) +	if (of_property_read_bool(np, "st,wakeup2-x-lo"))  		pdata->wakeup_flags2 |= LIS3_WAKEUP_X_LO; -	if (of_get_property(np, "st,wakeup2-x-hi", NULL)) +	if (of_property_read_bool(np, "st,wakeup2-x-hi"))  		pdata->wakeup_flags2 |= LIS3_WAKEUP_X_HI; -	if (of_get_property(np, "st,wakeup2-y-lo", NULL)) +	if (of_property_read_bool(np, "st,wakeup2-y-lo"))  		pdata->wakeup_flags2 |= LIS3_WAKEUP_Y_LO; -	if (of_get_property(np, "st,wakeup2-y-hi", NULL)) +	if (of_property_read_bool(np, "st,wakeup2-y-hi"))  		pdata->wakeup_flags2 |= LIS3_WAKEUP_Y_HI; -	if (of_get_property(np, "st,wakeup2-z-lo", NULL)) +	if (of_property_read_bool(np, "st,wakeup2-z-lo"))  		pdata->wakeup_flags2 |= LIS3_WAKEUP_Z_LO; -	if (of_get_property(np, "st,wakeup2-z-hi", NULL)) +	if (of_property_read_bool(np, "st,wakeup2-z-hi"))  		pdata->wakeup_flags2 |= LIS3_WAKEUP_Z_HI;  	if (of_get_property(np, "st,wakeup2-threshold", &val))  		pdata->wakeup_thresh2 = val; @@ -1073,9 +1073,9 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3)  		}  	} -	if (of_get_property(np, "st,hipass1-disable", NULL)) +	if (of_property_read_bool(np, "st,hipass1-disable"))  		pdata->hipass_ctrl |= LIS3_HIPASS1_DISABLE; -	if (of_get_property(np, "st,hipass2-disable", NULL)) +	if (of_property_read_bool(np, "st,hipass2-disable"))  		pdata->hipass_ctrl |= LIS3_HIPASS2_DISABLE;  	if (of_property_read_s32(np, "st,axis-x", &sval) == 0) @@ -1085,7 +1085,7 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3)  	if (of_property_read_s32(np, "st,axis-z", &sval) == 0)  		pdata->axis_z = sval; -	if (of_get_property(np, "st,default-rate", NULL)) +	if (of_property_read_u32(np, "st,default-rate", &val) == 0)  		pdata->default_rate = val;  	if (of_property_read_s32(np, "st,min-limit-x", &sval) == 0)  |