Commit Graph

935030 Commits

Author SHA1 Message Date
Alexander A. Klimov
a5dfb77533 staging: comedi: das: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200721185633.67671-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-25 15:27:25 +02:00
Alexander A. Klimov
f8cdbd4f4d staging: comedi: dt: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200721190653.67751-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-25 15:27:25 +02:00
Alexander A. Klimov
3659743d48 staging: comedi: ni: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200721191729.67847-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-25 15:27:25 +02:00
Alexander A. Klimov
2c183944ac staging: comedi: pcl: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200721192750.67925-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-25 15:27:25 +02:00
Alexander A. Klimov
e3913b6e06 staging: comedi: pcm: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200721193806.68010-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-25 15:27:25 +02:00
Alexander A. Klimov
a5fc6f6d39 staging: comedi: adl: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200723190813.71971-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-25 15:27:25 +02:00
Alexander A. Klimov
d761e90e6a staging: comedi: adv: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200723191827.72047-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-25 15:27:24 +02:00
Alexander A. Klimov
28ce4c5b19 staging: comedi: cb: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200723192842.72124-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-25 15:27:24 +02:00
Alexander A. Klimov
13d8b1f3c0 staging: comedi: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200723194053.72227-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-25 15:27:24 +02:00
Anant Thazhemadam
d8cc6b5664 STAGING - REALTEK RTL8188EU DRIVERS: Fix Coding Style Error
Running the checkpatch.pl script on the file for which patch was created, the
following error was found to exist.
ERROR: space required after that ',' (ctx:VxV)

Fixed the above error which was found on line #721 by inserting a blank
space at the appropriate position.

Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Link: https://lore.kernel.org/r/20200725122041.5663-1-anant.thazhemadam@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-25 15:27:24 +02:00
Priti Chattopadhyay
b5dbbadb0e Staging: rtl8188eu: Fix a constant comparison coding style issue
Modify equality comparison involving constants by shifting the constant
operand to the right side of the comparison as suggested by
scripts/checkpatch.pl

Signed-off-by: Priti Chattopadhyay <pritias81@gmail.com>
Link: https://lore.kernel.org/r/20200723092150.y34bentngeeci2oc@pritichattopadhyay
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-23 20:34:34 +02:00
Fox Chen
b311b98d80 staging: rtl8723bs: Cleanup open brace issues
This cleans up open brace issues reported by checkpatch.pl

Signed-off-by: Fox Chen <foxhlchen@gmail.com>
Link: https://lore.kernel.org/r/20200723093002.6175-1-foxhlchen@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-23 20:34:34 +02:00
Muhammad Usama Anjum
d05c9a9eef staging: octeon: Indent with tabs instead of spaces
Remove a coding style error. It makes code more readable.

Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
Link: https://lore.kernel.org/r/20200723132123.GA26221@musamaanjum
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-23 20:34:34 +02:00
Colin Ian King
fa74af6b12 staging: unisys: visorhba: remove redundant initialization of variables scsicmd_id and rc
The variables scsicmd_id and rc is being initialized with a value
that is never read and are being updated later with a new value.
The initializations are 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/20200723155415.994036-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-23 20:34:34 +02:00
Muhammad Usama Anjum
20a2d16d22 staging: octeon: Add the license identifier
This patch fixes the checkpatch.pl warning:
WARNING: Missing or malformed SPDX-License-Identifier tag

Add a the SPDX-License-Identifier tag on line 1

Other files in this folder have GPL-2.0 license. So this file should
have the same license which was missing before and checkpatch.pl was
giving the warning.

Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
Link: https://lore.kernel.org/r/20200723180723.GA30699@musamaanjum
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-23 20:34:34 +02:00
Mrinal Pandey
032ae2fd3c staging: rtl8188eu: Fix an indent coding style issue
Only a single tab space is required after the if statement.
Fix this issue by running scripts/checkpatch.pl on the file.

Signed-off-by: Mrinal Pandey <mrinalmni@gmail.com>
Link: https://lore.kernel.org/r/20200722151900.5dcebtavkdi5cc77@mrinalpandey
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-23 10:31:46 +02:00
Anmol Karn
12d9516944 staging: vc04_services: vchiq-mmal: Fixed tab styling issue in mmal-vchiq.c
This cahnge fixes a checkpatch error for "code indent should use tabs where possible".

compile Tested only
[Linux-next-20200722]

Signed-off-by: Anmol Karn <anmol.karan123@gmail.com>
Link: https://lore.kernel.org/r/20200723072115.408070-1-anmol.karan123@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-23 10:31:46 +02:00
Michael Straube
a176db5761 staging: rtl8188eu: cleanup whitespace in declarations
Replace tabs with spaces in declarations to cleanup whitespace
in rtl8188eu_recv.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200723075243.21924-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-23 10:31:45 +02:00
Michael Straube
869090266c staging: rtl8188eu: clear alignment style issues
Clear checkpatch alignment style issues in rtl8188eu_recv.c.
CHECK: Alignment should match open parenthesis

The file is now checkpatch clean.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200723075243.21924-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-23 10:31:45 +02:00
Greg Kroah-Hartman
6c1649f51c Second set of new device support, cleanups etc for IIO/Counters in the 5.9 cycle
There are two merge commits in here of immutable branches that may
 also be picked up through other trees (clocksource and input)
 
 I've put a few late breaking fixes in here that aren't worth rushing
 in before the  merge window.  One major fix for an issue introduced
 in the last set that can result in devices not having their parent set.
 
 This set is dominated by W=1 cleanups from Lee Jones. I won't list them
 all separately.  They are mostly:
 * Kernel doc fixes
 * Unused variable removal.
 * Suppression of unused stuff that is static in headers.
 
 Counters subsystem
 * atmel-tcb
   - New counter driver after various cleanups of existing tcb code and bindings.
 
 Device support
 * stk311
   - Trivial addition of ID for STK311-X variant.
 
 yaml conversions
 * kionix,kxsd9
 * ti,ads8688
 
 Features
 * jz47xx
   - Add support for touch screen channels. In this particular case the
     boards in question actually wire a joystick to them so we want them
     as simple voltage channels. The joystick driver will probably go
     via the input tree.
 
 Cleanups + fixes
 * core
   - A rebase issue in recent major refactoring dropped the assignment of
     of the device parent in the core. Put it back.
 * ad5592r
   - Fix unbalanced mutex unlocks in *_read_raw()
 * ad7124
   - Move chip ID and name to the chip_info table plus add a read of the
     revision register to check the device is working during probe.
 * ad7192
   - Ridy up ordering to put the match table near the end fo the file where it
     is used.
 * lsm6dsx
   - Reset the hardware timestamp after a resume to avoid an issue with
     missaligned timestamps after suspend.
 * jz47xx
   - Error checks on clk_enable() calls.
   - xlate callaback to find channel index.
   - Use separate chan_spec arrays for different variants rather than
     parts of a single list.  Simplifies code.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAl8YSUoRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0Fogjqw//RAlVdMc+g/kFggvcm+H2UHXoo02sMQoI
 +16PgZBNQqxVDjSBabxn9pWwj4Igq5Ecmca8pLenB7vLw73mW81OUgL08M+iBP0+
 I48AVht6VHeKHPFrGvH0t05qW6Tv7EKbQNMuc6UON9iSVu38Z6J8xZGOF/SLJFWl
 ql9AWWWB4UYNRgPUZ7ybWuR8Ei/T6YUPRpe2mu9Q8t2J7iPoonByAEnveNe1MjkJ
 kQNLK7fG/0DSoERs9nl2edgwST+4vo8t+ArG5dCNFqvILCYM+5CkysUfTUIB5yN8
 V1VZWI7TbAOpxNVAkMQbXsEW9E9M8Ezp0zz/tmuJkaqYznTuw930U1buQKIwR4Xn
 q+LpWAQbhvKuqmPzZ6lV/omPGtCUh1dvJVCCA+lYAdpaf8ZSCiggVMOpMDipn+VK
 rthw6FA6s7Gk7+aSkDWpT736Sa+G6oOiaeeeb/cBHT9AeMfUx8BKgiVeDUt9BqEa
 UT9fHtJr2JviaPwiMbb3Kyc+xm6DqPu95/hNKw5dIRtdfg+V81W+ZAH9ZwCdsm+X
 RScIiSq7xGOyVhlzR3KxCEdSgRB1pe6cOlvFbWk/XDM8+gdkQ4Cbznt2TiW+fxC+
 RPWNOstv1+XPplrUUvmKwAGHdokXx4FAz2UoxBuIkxXSV+ssPei6pVQ8YqQn3sw+
 TTz+SO/X8DU=
 =JD0d
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-5.9b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

Second set of new device support, cleanups etc for IIO/Counters in the 5.9 cycle

There are two merge commits in here of immutable branches that may
also be picked up through other trees (clocksource and input)

I've put a few late breaking fixes in here that aren't worth rushing
in before the  merge window.  One major fix for an issue introduced
in the last set that can result in devices not having their parent set.

This set is dominated by W=1 cleanups from Lee Jones. I won't list them
all separately.  They are mostly:
* Kernel doc fixes
* Unused variable removal.
* Suppression of unused stuff that is static in headers.

Counters subsystem
* atmel-tcb
  - New counter driver after various cleanups of existing tcb code and bindings.

Device support
* stk311
  - Trivial addition of ID for STK311-X variant.

yaml conversions
* kionix,kxsd9
* ti,ads8688

Features
* jz47xx
  - Add support for touch screen channels. In this particular case the
    boards in question actually wire a joystick to them so we want them
    as simple voltage channels. The joystick driver will probably go
    via the input tree.

Cleanups + fixes
* core
  - A rebase issue in recent major refactoring dropped the assignment of
    of the device parent in the core. Put it back.
* ad5592r
  - Fix unbalanced mutex unlocks in *_read_raw()
* ad7124
  - Move chip ID and name to the chip_info table plus add a read of the
    revision register to check the device is working during probe.
* ad7192
  - Ridy up ordering to put the match table near the end fo the file where it
    is used.
* lsm6dsx
  - Reset the hardware timestamp after a resume to avoid an issue with
    missaligned timestamps after suspend.
* jz47xx
  - Error checks on clk_enable() calls.
  - xlate callaback to find channel index.
  - Use separate chan_spec arrays for different variants rather than
    parts of a single list.  Simplifies code.

* tag 'iio-for-5.9b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (69 commits)
  iio: imu: st_lsm6dsx: reset hw ts after resume
  iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw()
  iio: core: fix/re-introduce back parent assignment
  iio: adc: ad7124: move chip ID & name on the chip_info table
  counter: Add microchip TCB capture counter
  dt-bindings: counter: microchip-tcb-capture counter
  dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible
  dt-bindings: atmel-tcb: convert bindings to json-schema
  ARM: at91: add atmel tcb capabilities
  IIO: Ingenic JZ47xx: Add touchscreen mode.
  dt-bindings: iio/adc: Add touchscreen idx for JZ47xx SoC ADC
  iio/adc: ingenic: Retrieve channels list from soc data struct
  IIO: Ingenic JZ47xx: Add xlate cb to retrieve correct channel idx
  IIO: Ingenic JZ47xx: Error check clk_enable calls.
  dt-bindings: iio: ti,ads8688 yaml conversion
  iio: light: stk3310: add chip id for STK3311-X variant
  dt-bindings: iio: accel: kionix,kxsd9 yaml conversion.
  iio: adc: ad7192: move ad7192_of_match table closer to the end of the file
  iio: adc: rockchip_saradc: Demote seemingly unintentional kerneldoc header
  iio: imu: st_lsm6dsx: st_lsm6dsx: Mark 'st_lsm6dsx_accel_ext_info' as __maybe_unused
  ...
2020-07-22 16:26:14 +02:00
Lorenzo Bianconi
a1bab9396c iio: imu: st_lsm6dsx: reset hw ts after resume
Reset hw time samples generator after system resume in order to avoid
disalignment between system and device time reference since FIFO
batching and time samples generator are disabled during suspend.

Fixes: 213451076b ("iio: imu: st_lsm6dsx: add hw timestamp support")
Tested-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-22 14:55:43 +01:00
Alexandru Ardelean
65afb0932a iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw()
There are 2 exit paths where the lock isn't held, but try to unlock the
mutex when exiting. In these places we should just return from the
function.

A neater approach would be to cleanup the ad5592r_read_raw(), but that
would make this patch more difficult to backport to stable versions.

Fixes 56ca9db862: ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs")
Reported-by: Charles Stanhope <charles.stanhope@gmail.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-22 14:51:54 +01:00
Jonathan Cameron
1c2f21be65 Merge branch 'ib-5.8-tcb' into HEAD
Series needed as base for a clocksource tree hence immutable branch
2020-07-22 14:37:23 +01:00
Jonathan Cameron
d0d7c5845e Merge branch 'ib-5.8-jz47xx-ts' into HEAD
Immutable branch may be needed in input for a joystick set that is
dependent on it.
2020-07-22 14:36:31 +01:00
Alexandru Ardelean
8525df47b3 iio: core: fix/re-introduce back parent assignment
This was introduced initially via commit 78289b4a58 ("iio: core: pass
parent device as parameter during allocation"), but was accidentally
removed via commit 6d4ebd565d ("iio: core: wrap IIO device into an
iio_dev_opaque object").

This looks like a rebase gone wrong, and ends up breaking devicetree
bindings of IIO clients.

This change adds back the parent assignment.

Fixes 6d4ebd565d: ("iio: core: wrap IIO device into an iio_dev_opaque object")
Reported-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Tested-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-22 14:36:23 +01:00
Alexandru Ardelean
951ad47003 iio: adc: ad7124: move chip ID & name on the chip_info table
This change does the following:
* removes the SPI device table in favor of the OF device table
* adds 'name' && 'chip_id' fields to chip_info
* implements chip ID & silicon revision checking; the device ID for
  AD7124-4 is 0x0, so just checking that value can be useless;
  but at least the silicon revision isn't 0, so a non-zero value can be
  used to check that "a" device is on the SPI bus; it's probably the best
  way to narrow it down to one of the 2 AD7124 chip IDs

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-22 14:36:05 +01:00
Ioana Ciornei
70476feb62 staging: dpaa2-ethsw: check if there is space for a new VLAN
Avoid getting into a WARNING as below by checking, while in the prepare
state of the transactional operation, if there is space for a new VLAN.
If we reached the maximum number, return an appropriate error.

[ 6503.657564] eth3: Commit of object (id=1) failed.
[ 6503.657588] WARNING: CPU: 2 PID: 17144 at net/switchdev/switchdev.c:277 switchdev_port_obj_add_now+0xcc/0x110
...
[ 6503.657628] x1 : 70887ce26695c500 x0 : 0000000000000000
[ 6503.657630] Call trace:
[ 6503.657633]  switchdev_port_obj_add_now+0xcc/0x110
[ 6503.657635]  switchdev_port_obj_add+0x40/0xc0
[ 6503.657638]  br_switchdev_port_vlan_add+0x50/0x78
[ 6503.657640]  __vlan_add+0x2dc/0x758
[ 6503.657642]  nbp_vlan_add+0xc0/0x180
[ 6503.657644]  br_vlan_info.isra.0+0x68/0x128
[ 6503.657646]  br_process_vlan_info+0x224/0x2f8
[ 6503.657647]  br_afspec+0x158/0x188
[ 6503.657649]  br_setlink+0x1a4/0x290

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20200721091919.20394-7-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 16:53:34 +02:00
Ioana Ciornei
1867a402d8 staging: dpaa2-ethsw: read the port state from firmware
Rely on the port state seen by the firmware since it will also be the
one erroring out when trying to setup anything major when the port is
up.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20200721091919.20394-6-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 16:53:34 +02:00
Ioana Ciornei
adcdd57d5f staging: dpaa2-ethsw: destroy workqueue after deregistering the notifiers
We should destroy the switch workqueue only after deregistering the
switchdev notifiers. Without this fix, we could end up with switchdev
notifications on a draining workqueue and also with a lock up since the
netdevice reference count is increased (in port_switchdev_event) and not
decreased ever (since the workqueue did not run).

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20200721091919.20394-5-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 16:53:34 +02:00
Ioana Ciornei
4acfc4393e staging: dpaa2-ethsw: setup the STP state for all installed VLANs
Setup the STP state for all VLANs installed on the port. This is also
avoiding the error situation when the DEFAULT_VLAN_ID is not installed
on the port (thus the firmware complains that it cannot setup the
required STP state).

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20200721091919.20394-4-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 16:53:34 +02:00
Ioana Ciornei
af85d0e06c staging: dpaa2-ethsw: don't allow interfaces from different DPSWs to be bridged
Error out when the user tries to bridge two switch interfaces that are
from different DPSW instances. This is not supported by the hardware and
we should reflect this into what the user is aware of.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20200721091919.20394-3-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 16:53:34 +02:00
Ioana Ciornei
b99a3f7093 staging: dpaa2-ethsw: verify the nofifier block
Since now we have a notifier block for each DPSW instance probed, we
have to also check that the netdev is indeed connected to the notifier
received. Without this, we end up with the same switchdev callback being
executed multiple times (because it would be received by all notifier
blocks, not just the one intended to).
Also, move the function higher in the source file because it will be
used in later patches from multiple places.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20200721091919.20394-2-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 16:53:34 +02:00
Suraj Upadhyay
0062668547 staging: rts5208: rtsx: Replace depracated MSI API
Replace depracated MSI IRQ enablers and disablers
with pci_alloc_irq_vectors and pci_free_irq_vectors respectively.
Compile tested.

Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
Link: https://lore.kernel.org/r/20200719143404.GA32519@blackclown
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 16:52:47 +02:00
Marian Posteuca
2f248a8022 staging: dpaa2-ethsw: fix switch/case fallthrough warning
Fix the fallthrough warning that is reported by checkpatch.

Signed-off-by: Marian Posteuca <posteuca@mutex.one>
Link: https://lore.kernel.org/r/20200720064205.10323-1-posteuca@mutex.one
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 16:52:47 +02:00
Darshan D V
846fbc621f staging: rtl8192e: add proper code indent
As the code indent for a conditional statement is
not according to the preferred coding style for
the linux kernel, add code indent as necessary
after a conditional statement.

Signed-off-by: Darshan D V <darshandv10@gmail.com>
Link: https://lore.kernel.org/r/20200720091442.19532-2-darshandv10@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 16:52:47 +02:00
Darshan D V
77cedcc0b3 staging: rtl8192e: add space before open parenthesis
Fix the coding style error by adding a space before
open parenthesis '(' in a conditional statement.

Signed-off-by: Darshan D V <darshandv10@gmail.com>
Link: https://lore.kernel.org/r/20200720091442.19532-1-darshandv10@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 16:52:47 +02:00
Sumera Priyadarsini
15d25ed790 staging: wlan-ng: Fix alignment to match open parenthesis
This patch fixes the file cfg80211.c to avoid
the checkpatch.pl warning:
	CHECK: Alignment should match open parenthesis

Signed-off-by: Sumera Priyadarsini <sylphrenadin@gmail.com>
Link: https://lore.kernel.org/r/20200720122817.31164-1-sylphrenadin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-21 16:52:47 +02:00
Kamel Bouhara
106b104137 counter: Add microchip TCB capture counter
This drivers allows to use the capture mode of the Timer Counter Block
hardware block available in Microchip SoCs through the counter subsystem.

Two functions of the counter are supported for the moment: period
capture and quadrature decoder. The latter is only supported by the
SAMA5 series of SoCs.

For the period capture mode a basic setup has been chosen that will
reset the counter each time the period is actually reached. Of course
the device offers much more possibilities.

For quadrature mode, both channel 0 and 1 must be configured even if we
only capture the position (no revolution/rotation).

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-20 13:04:40 +01:00
Kamel Bouhara
7eb181cf06 dt-bindings: counter: microchip-tcb-capture counter
Describe the devicetree binding for the Microchip TCB module.
Each counter blocks exposes three independent counters.

However, when configured in quadrature decoder, both channel <0> and <1>
are required for speed/position and rotation capture (yet only the
position is captured).

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-20 13:03:40 +01:00
Alexandre Belloni
3f07899fc3 dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible
The sama5d2 TC block TIMER_CLOCK1 is different from the at91sam9x5 one.
Instead of being MCK / 2, it is the TCB GCLK.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-20 13:03:09 +01:00
Alexandre Belloni
4b88c673cd dt-bindings: atmel-tcb: convert bindings to json-schema
Convert Atmel Timer Counter Blocks bindings to DT schema format using
json-schema.

Also move it out of mfd as it is not and has never been related to mfd.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-20 13:01:06 +01:00
Kamel Bouhara
d3818c4815 ARM: at91: add atmel tcb capabilities
Some atmel socs have extra tcb capabilities that allow using a generic
clock source or enabling a quadrature decoder.

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-20 12:57:31 +01:00
Artur Rojek
b96952f498 IIO: Ingenic JZ47xx: Add touchscreen mode.
The SADC component in JZ47xx SoCs provides support for touchscreen
operations (pen position and pen down pressure) in single-ended and
differential modes.

The touchscreen component of SADC takes a significant time to stabilize
after first receiving the clock and a delay of 50ms has been empirically
proven to be a safe value before data sampling can begin.

Of the known hardware to use this controller, GCW Zero and Anbernic RG-350
utilize the touchscreen mode by having their joystick(s) attached to the
X/Y positive/negative input pins.

JZ4770 and later SoCs introduce a low-level command feature. With it, up
to 32 commands can be programmed, each one corresponding to a sampling
job. It allows to change the low-voltage reference, the high-voltage
reference, have them connected to VCC, GND, or one of the X-/X+ or Y-/Y+
pins.

This patch introduces support for 6 stream-capable channels:
- channel #0 samples X+/GND
- channel #1 samples Y+/GND
- channel #2 samples X-/GND
- channel #3 samples Y-/GND
- channel #4 samples X+/X-
- channel #5 samples Y+/Y-

Being able to sample X-/GND and Y-/GND is useful on some devices, where
one joystick is connected to the X+/Y+ pins, and a second joystick is
connected to the X-/Y- pins.

All the boards which probe this driver have the interrupt provided from
Device Tree, with no need to handle a case where the IRQ was not provided.

Co-developed-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-20 10:28:39 +01:00
Artur Rojek
842247203c dt-bindings: iio/adc: Add touchscreen idx for JZ47xx SoC ADC
Introduce support for touchscreen channels found in JZ47xx SoCs.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Tested-by: Paul Cercueil <paul@crapouillou.net>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-20 10:27:46 +01:00
Paul Cercueil
6a294b41ab iio/adc: ingenic: Retrieve channels list from soc data struct
Instead of having one array of struct iio_chan_spec for all SoCs, and
have some SoCs remove the last item of the array as they can't use it,
have each SoC define its array of supported channels.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Artur Rojek <contact@artur-rojek.eu>
Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-20 10:26:50 +01:00
Artur Rojek
155e41efe7 IIO: Ingenic JZ47xx: Add xlate cb to retrieve correct channel idx
Provide an of_xlate callback in order to retrieve the correct channel
specifier index from the IIO channels array.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Tested-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-20 10:25:32 +01:00
Artur Rojek
1a99dc4679 IIO: Ingenic JZ47xx: Error check clk_enable calls.
Introduce error checks for the clk_enable calls used in this driver.
As part of the changes, move clk_enable/clk_disable calls out of
ingenic_adc_set_config and into respective logic of its callers.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Tested-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-07-20 10:24:01 +01:00
Alexander A. Klimov
809a930864 staging: Replace HTTP links with HTTPS ones
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.

Deterministic algorithm:
For each file:
  If not .svg:
    For each line:
      If doesn't contain `\bxmlns\b`:
        For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
            If both the HTTP and HTTPS versions
            return 200 OK and serve the same content:
              Replace HTTP with HTTPS.

Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de>
Link: https://lore.kernel.org/r/20200719123244.58718-1-grandmaster@al2klimov.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-20 10:22:47 +02:00
Michael Straube
315116579f staging: rtl8188eu: add spaces around operators in header files
Add spaces around operators in the header files to improve readability
and clear checkpatch issues.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200719114045.13595-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-20 10:22:47 +02:00
Anoop S
939032fb84 Staging: rtl8188eu: core: Fix coding style issue
This fixes the following checkpatch.pl warning
WARNING: Prefer using '"%s...", __func__' to using 'rtw_tkip_decrypt', this function's name, in a string.

Signed-off-by: Anoop S <anoop.skumar1507@gmail.com>
Link: https://lore.kernel.org/r/20200718103125.62528-1-anoop.skumar1507@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-20 10:22:47 +02:00