From: Greg Kroah-Hartman Date: Mon, 27 Apr 2020 10:20:40 +0000 (+0200) Subject: Merge 5.7-rc3 into staging-next X-Git-Tag: v5.15~3664^2~218 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8014d83f60479d3981baeaa3a21c993ff832f3f;p=platform%2Fkernel%2Flinux-starfive.git Merge 5.7-rc3 into staging-next We need the staging fixes in here too, and this resolves a merge issue with the vt6656 driver. Signed-off-by: Greg Kroah-Hartman --- e8014d83f60479d3981baeaa3a21c993ff832f3f diff --cc drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c index 947ca3a,64ef07a..e20d2ca --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c @@@ -628,13 -536,22 +629,25 @@@ st_lsm6dsx_shub_write_raw(struct iio_de val = val * 1000 + val2 / 1000; err = st_lsm6dsx_shub_get_odr_val(sensor, val, &data); - if (!err) - sensor->odr = val; + if (!err) { + struct st_lsm6dsx_hw *hw = sensor->hw; + struct st_lsm6dsx_sensor *ref_sensor; + u8 odr_val; + int odr; + + ref_sensor = iio_priv(hw->iio_devs[ST_LSM6DSX_ID_ACC]); + odr = st_lsm6dsx_check_odr(ref_sensor, val, &odr_val); + if (odr < 0) + return odr; + + sensor->ext_info.slv_odr = val; + sensor->odr = odr; + } break; } + case IIO_CHAN_INFO_SCALE: + err = st_lsm6dsx_shub_set_full_scale(sensor, val2); + break; default: err = -EINVAL; break; diff --cc drivers/staging/vt6656/main_usb.c index 7fda26b,5f78cad..aad97fc --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@@ -818,12 -739,17 +815,15 @@@ static void vnt_bss_info_changed(struc priv->short_slot_time = false; vnt_set_short_slot_time(priv); - vnt_update_ifs(priv); vnt_set_vga_gain_offset(priv, priv->bb_vga[0]); - vnt_update_pre_ed_threshold(priv, false); } + if (changed & (BSS_CHANGED_BASIC_RATES | BSS_CHANGED_ERP_PREAMBLE | + BSS_CHANGED_ERP_SLOT)) + vnt_set_bss_mode(priv); + - if (changed & BSS_CHANGED_TXPOWER) - vnt_rf_setpower(priv, priv->current_rate, - conf->chandef.chan->hw_value); + if (changed & (BSS_CHANGED_TXPOWER | BSS_CHANGED_BANDWIDTH)) + vnt_rf_setpower(priv, conf->chandef.chan); if (changed & BSS_CHANGED_BEACON_ENABLED) { dev_dbg(&priv->usb->dev, diff --cc include/linux/iio/iio.h index 5f9f439,25c8750..a1be82e --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h @@@ -597,9 -600,10 +597,9 @@@ void iio_device_unregister(struct iio_d * 0 on success, negative error number on failure. */ #define devm_iio_device_register(dev, indio_dev) \ - __devm_iio_device_register((dev), (indio_dev), THIS_MODULE); + __devm_iio_device_register((dev), (indio_dev), THIS_MODULE) int __devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev, struct module *this_mod); -void devm_iio_device_unregister(struct device *dev, struct iio_dev *indio_dev); int iio_push_event(struct iio_dev *indio_dev, u64 ev_code, s64 timestamp); int iio_device_claim_direct_mode(struct iio_dev *indio_dev); void iio_device_release_direct_mode(struct iio_dev *indio_dev);