- 25 Aug, 2019 1 commit
-
-
Stefan Popa authored
The AD7606B is a 16-bit ADC that supports simultaneous sampling of 8 channels. It is pin compatible to AD7606, but adds extra modes by writing to the register map. The AD7606B can be configured to work in software mode by setting all oversampling pins to high. This mode is selected by default. The oversampling ratio is configured from the OS_MODE register (address 0x08) with the addition of OS=128 and OS=256 that were not available in hardware mode. The device is configured to output data on a single spi channel, but this configuration must be done right after restart. That is why the delay was removed for devices which doesn't require it. Moreover, in software mode, the range gpio has no longer its function. Instead, the scale can be configured individually for each channel from the RANGE_CH registers (address 0x03 to 0x06). Besides the already supported ±10 V and ±5 V ranges, software mode can also accommodate the ±2.5 V range. Signed-off-by: Stefan Popa <stefan.popa@analog.com> Co-developed-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Beniamin Bia <beniamin.bia@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 18 Aug, 2019 11 commits
-
-
Bartosz Golaszewski authored
The generated files must not be tracked by git. Add a local .gitignore. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Freeman Liu authored
On Spreadtrum platform, the headphone will read one ADC channel multiple times to identify the headphone type, and the headphone identification is sensitive of the ADC reading time. And we found it will take longer time to reading ADC data by using interrupt mode comparing with the polling mode, thus we should change to polling mode to improve the efficiency of reading data, which can identify the headphone type successfully. Signed-off-by: Freeman Liu <freeman.liu@unisoc.com> Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Andy Shevchenko authored
Instead of linear approach to calculate power of 10, use generic int_pow() which does it better. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Chuhong Yuan authored
Use device-managed APIs to simplify the code. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Rodrigo Ribeiro authored
Replace shift and minus operation by GENMASK macro and remove the local variables used to store intermediate data. Signed-off-by: Rodrigo Ribeiro Carvalho <rodrigorsdc@gmail.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Denis Efremov authored
Fix typo (s/quadddec/quaddec/) in the path to the documentation. Cc: linux-iio@vger.kernel.org Fixes: 517b2d04 ("MAINTAINERS: add counter/ftm-quaddec driver entry") Signed-off-by: Denis Efremov <efremov@linux.com> Acked-by: Patrick Havelange <patrick.havelange@essensium.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mircea Caprioru authored
This patch add device tree binding documentation for AD7192 adc in YAML format. Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mircea Caprioru authored
By adding this option we are able to remove the sync3 field and dt binding. When setting the required cutoff frequency we also determine the ADC configuration for chop and sync filter. Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Mircea Caprioru authored
This patch removes the reference voltage entry from the platform_data structure. This is no longer needed since the reference voltage is obtained from the device tree. With this we also remove the entire ad7192.h file. The undefined reference voltage warning is promoted to an error signaling a problem with the device tree. Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Alexandru Ardelean authored
Caught via static-analysis checker: ``` drivers/iio/imu/adis16460.c 152 static int adis16460_set_freq(struct iio_dev *indio_dev, int val, int val2) 153 { 154 struct adis16460 *st = iio_priv(indio_dev); 155 unsigned int t; ^^^^^^^^^^^^^^ 156 157 t = val * 1000 + val2 / 1000; 158 if (t <= 0) ^^^^^^ Unsigned is not less than zero. ``` The types of `val` && `val2` are obtained from the IIO `write_raw` hook, so userspace can provide negative values, which can cause weird behavior after conversion to unsigned. This patch changes the sign of variable `t` so that -EINVAL will be returned for negative values as well. Fixes: db6ed4d2 ("iio: imu: Add support for the ADIS16460 IMU") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
Hans de Goede authored
The KIOX010A and KIOX020A ACPI ids go hand in hand, they are used in yoga style 2-in-1s, with KIOX010A indicating the KXCJ91008 sensor in the display of the 2-in-1 and KIOX020A indicating the KXCJ91008 sensor in the base. Improve the existing comment on the "KIOX010A" kx_acpi_match table entry to make clear we are talking about a yoga-style (360 degree hinges) device here and add a similar comment to the "KIOX020A" entry. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-
- 15 Aug, 2019 8 commits
-
-
Greg Kroah-Hartman authored
There is some "confusing" license text in some of the sm750fb driver files. After discussing it with the company, it turns out to have been a mistake and these lines can be safely removed. The files are all to be licensed under the GPLv2 license. Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: linux-fbdev@vger.kernel.org Cc: devel@driverdev.osuosl.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20190815123009.16499-1-gregkh@linuxfoundation.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gao Xiang authored
As Chao pointed out [1], ENOTSUPP is used for NFS protocol only, we should use EOPNOTSUPP instead... [1] https://lore.kernel.org/lkml/108ee2f9-75dd-b8ab-8da7-b81c17bafbf6@huawei.com/Reported-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190814103705.60698-3-gaoxiang25@huawei.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gao Xiang authored
For some specific fields, use EOPNOTSUPP instead of EIO for values which look sane but aren't supported right now. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190814103705.60698-2-gaoxiang25@huawei.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gao Xiang authored
Previously, EROFS uses EIO to indicate that filesystem is corrupted as well. However, as Pavel said [1], other filesystems tend to use EUCLEAN(EFSCORRUPTED) instead, let's follow what others do right now. Also, add some more prints to the syslog. [1] https://lore.kernel.org/lkml/20190813114821.GB11559@amd/Suggested-by: Pavel Machek <pavel@denx.de> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190814103705.60698-1-gaoxiang25@huawei.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Colin Ian King authored
Variable fx2delay is being initialized with a value that is never read and fx2delay is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190815105314.5756-1-colin.king@canonical.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Colin Ian King authored
There is a statement that is indented one level too deeply, remove the extraneous tab. Addresses-Coverity: ("Identation does not match nesting level") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190815084034.13885-1-colin.king@canonical.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nishka Dasgupta authored
Static structure apex_desc, of type gasket_driver_desc, is used only as an argument to the functions gasket_register_device() and gasket_unregister_device(). In the definitions of both these functions, their parameter is declared as const. Hence make apex_desc itself constant to protect it from modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190815054924.643-1-nishkadg.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Pratik Shinde authored
in fill_inode() we call iloc() twice.Avoiding the extra call by storing the result. Signed-off-by: Pratik Shinde <pratikshinde320@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Cc: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190813203840.13782-1-pratikshinde320@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 14 Aug, 2019 20 commits
-
-
Ioana Ciornei authored
Link settings can be changed only when the interface is down. Disable and re-enable the interface, if necessary, behind the scenes so that we do not force users to an if down/up sequence. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-11-git-send-email-ioana.ciornei@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ioana Ciornei authored
The register_netdev() call should be made only when ready to process any user request on the interface. Move the call to be the last one issued in the probe sequence. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-10-git-send-email-ioana.ciornei@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ioana Ciornei authored
In the current state, the dpaa2-ethsw driver supports only one bridge per DPSW object. Reword the error message so that this information is much more clear. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-9-git-send-email-ioana.ciornei@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ioana Ciornei authored
The ethsw_add_vlan() function is already called only when the VLAN is not yet configured on the switch. Remove the redundant check. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-8-git-send-email-ioana.ciornei@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ioana Ciornei authored
The ethtool core already zeroes the memory before calling .get_ethtool_stats() thus making the memset unnecessary. Remove it. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-7-git-send-email-ioana.ciornei@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ioana Ciornei authored
Use a bool instead of an u8 in ethsw_set_learning() and ethsw_port_set_flood() to encode an binary type property. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-6-git-send-email-ioana.ciornei@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ioana Ciornei authored
Since ethtool will be loud enough if the .set_link_ksettings() callback fails, remove the debug messages which do not add additional information. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-5-git-send-email-ioana.ciornei@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ioana Ciornei authored
Add the '\n' line terminator to the string formats missing it. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-4-git-send-email-ioana.ciornei@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ioana Ciornei authored
At probe time, only the DPSW object should be enabled without the associated ports, which will get enabled on dev_open. Remove the ethsw_open() and ethsw_stop() functions and replace them only with dpsw_enable()/_disable(). Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-3-git-send-email-ioana.ciornei@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ioana Ciornei authored
Do not add an IGMP multicast address by default since we do not support Rx/Tx ar the moment. Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/1565700187-16048-2-git-send-email-ioana.ciornei@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Colin Ian King authored
Variable ret is initialized to a value that is never read and it is re-assigned later. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190813124838.1317-1-colin.king@canonical.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Merwin Trever Ferrao authored
When the checkpatch.pl script was run, it showed lines with length more than 80 characters in rtl8712_recv.c file. Fixed by breaking it up into two lines within 80 characters. Signed-off-by: Merwin Trever Ferrao <merwintf@gmail.com> Link: https://lore.kernel.org/r/20190813065806.GA23606@IoT-COESigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nishka Dasgupta authored
Change return type of r8712_dump_aggr_xframe from u8 to void as it always returns _SUCCESS and its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-4-nishkadg.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nishka Dasgupta authored
Change return type of r8712_xmitframe_aggr_1st from u8 to void as it always returns _SUCCESS and its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-3-nishkadg.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nishka Dasgupta authored
Change return type of r8712_append_mpdu_unit from u8 to void and remove its return statement as it always returns only _SUCCESS. Modify call sites to simply call this function instead of checking its return value, and execute all the statements in the if-block for when the function returns _SUCCESS. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-2-nishkadg.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nishka Dasgupta authored
Change return values of xmitframe_addmic from _SUCCESS and _FAIL to 0 and -ENOMEM respectively. Modify call sites to check for non-zero values instead of _FAIL. Also change return type from sint to int. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190813044638.16348-1-nishkadg.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Kai-Heng Feng authored
The procfs provides many useful information for debugging, but it may be too much for normal usage, routines like proc_get_sec_info() reports various security related information. So let's remove it. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Link: https://lore.kernel.org/r/20190813042426.13733-1-kai.heng.feng@canonical.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gao Xiang authored
Kill all the remaining BUG_ON in EROFS: - one BUG_ON was used to detect xattr on-disk corruption, proper error handling should be added for it instead; - the other BUG_ONs are used to detect potential issues, use DBG_BUGON only in (eng) debugging version. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190813023054.73126-3-gaoxiang25@huawei.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gao Xiang authored
cleancache was not fully implemented in EROFS. In addition, it's tend to remove the whole cleancache in related attempt [1]. [1] https://lore.kernel.org/linux-fsdevel/20190527103207.13287-3-jgross@suse.com/Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190813023054.73126-2-gaoxiang25@huawei.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gao Xiang authored
As a helper in erofs_fs.h, erofs_inode_is_data_compressed() should be inlined. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Link: https://lore.kernel.org/r/20190813023054.73126-1-gaoxiang25@huawei.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-