16 Sep, 2020
3 commits
-
v4:
split power down flow and power saving function to two patchv5:
fix up modified change under the --- lineAdd rts522a L1 sub-state support
Save more power on rts5227 rts5249 rts525a rts5260
Fix rts5260 driving parameterSigned-off-by: Ricky Wu
Link: https://lore.kernel.org/r/20200907100731.7722-1-ricky_wu@realtek.com
Signed-off-by: Greg Kroah-Hartman -
Fix and sort out rtsx driver power down flow
Signed-off-by: Ricky Wu
Link: https://lore.kernel.org/r/20200907100718.7672-1-ricky_wu@realtek.com
Signed-off-by: Greg Kroah-Hartman -
When mfd_add_devices() fail, pcr->slots should also be freed. However,
the current implementation does not free the member, leading to a memory
leak.Fix this by adding a new goto label that frees pcr->slots.
Signed-off-by: Keita Suzuki
Link: https://lore.kernel.org/r/20200909071853.4053-1-keitasuzuki.park@sslab.ics.keio.ac.jp
Signed-off-by: Greg Kroah-Hartman
28 Aug, 2020
1 commit
-
this power saving action in rtsx_pci_init_ocp() cause INTEL-NUC6 platform
missing card readerSigned-off-by: Ricky Wu
Link: https://lore.kernel.org/r/20200824030006.30033-1-ricky_wu@realtek.com
Signed-off-by: Greg Kroah-Hartman
23 Jul, 2020
1 commit
-
Drivers should not use legacy power management as they have to manage power
states and related operations, for the device, themselves. This driver was
handling them with the help of PCI helper functions like
pci_save/restore_state(), pci_enable/disable_device(), etc.With generic PM, all essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.Compile-tested only.
Signed-off-by: Vaibhav Gupta
Link: https://lore.kernel.org/r/20200720101722.145211-1-vaibhavgupta40@gmail.com
Signed-off-by: Greg Kroah-Hartman
22 Jul, 2020
5 commits
-
When reading registers defined by the PCIe spec, use the names already
defined by the PCI core. This makes maintenance of the PCI core and
drivers easier. No functional change intended.Signed-off-by: Bjorn Helgaas
Acked-by: Arnd Bergmann
Link: https://lore.kernel.org/r/20200721212336.1159079-6-helgaas@kernel.org
[ additional replacements due to changes in my tree - gregkh ]
Signed-off-by: Greg Kroah-Hartman -
Instead of hard-coding the location of the L1 PM Substates capability based
on the Device ID, search for it in the extended capabilities list. This
works for any device, as long as it implements the L1 PM Substates
capability correctly, so it doesn't require maintenance as new devices are
added. No functional change intended.Signed-off-by: Bjorn Helgaas
Acked-by: Arnd Bergmann
Link: https://lore.kernel.org/r/20200721212336.1159079-5-helgaas@kernel.org
[ minor addition due to differences in my tree - gregkh]
Signed-off-by: Greg Kroah-Hartman -
rtsx_pci_read_config_dword() and similar wrappers around the PCI config
accessors add very little value, and they obscure the fact that often we
are accessing standard PCI registers that should be coordinated with the
PCI core.Remove the wrappers and use the PCI config accessors directly. No
functional change intended.Signed-off-by: Bjorn Helgaas
Acked-by: Arnd Bergmann
Link: https://lore.kernel.org/r/20200721212336.1159079-4-helgaas@kernel.org
[ fixed up some other instances as original patch was based on old tree - gregkh
Signed-off-by: Greg Kroah-Hartman -
There are no more uses of struct rtsx_pcr.pcie_cap. Remove it.
Signed-off-by: Bjorn Helgaas
Acked-by: Arnd Bergmann
Link: https://lore.kernel.org/r/20200721212336.1159079-3-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman -
Instead of using the driver-specific rtsx_pci_write_config_byte() to update
the PCIe Link Control Register, use pcie_capability_write_word() like the
rest of the kernel does. This makes it easier to maintain ASPM across the
PCI core and drivers.No functional change intended. I missed this when doing 3d1e7aa80d1c
("misc: rtsx: Use pcie_capability_clear_and_set_word() for
PCI_EXP_LNKCTL").Signed-off-by: Bjorn Helgaas
Acked-by: Arnd Bergmann
Link: https://lore.kernel.org/r/20200721212336.1159079-2-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman
10 Jul, 2020
1 commit
-
In order to support new chip rts5228, the definitions of some internal
registers and workflow have to be modified.
Added rts5228.c rts5228.h for independent functions of the new chip rts5228Signed-off-by: Ricky Wu
Link: https://lore.kernel.org/r/20200706070259.32565-1-ricky_wu@realtek.com
Signed-off-by: Greg Kroah-Hartman
01 Jul, 2020
1 commit
-
This reverts commit 6bf23661d4a7a105001ebb4410c1c0a17752fac4.
0-day reported build problems with it.
Reported-by: kernel test robot
Cc: Vaibhav Gupta
Signed-off-by: Greg Kroah-Hartman
30 Jun, 2020
2 commits
-
Drivers should not use legacy power management as they have to manage power
states and related operations, for the device, themselves. This driver was
handling them with the help of PCI helper functions like
pci_save/restore_state(), pci_enable/disable_device(), etc.With generic PM, all essentials will be handled by the PCI core. Driver
needs to do only device-specific operations.The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use
device_wakeup_disable() instead.Compile-tested only.
Signed-off-by: Vaibhav Gupta
Link: https://lore.kernel.org/r/20200629081531.214734-3-vaibhavgupta40@gmail.com
Signed-off-by: Greg Kroah-Hartman -
rtsx_usb_usb_ids is never modified and can therefore be made const to
allow the compiler to put it in read-only memory.Before:
text data bss dec hex filename
21513 4160 128 25801 64c9 drivers/misc/cardreader/rtsx_usb.oAfter:
text data bss dec hex filename
21673 4000 128 25801 64c9 drivers/misc/cardreader/rtsx_usb.oSigned-off-by: Rikard Falkeborn
Link: https://lore.kernel.org/r/20200610224704.27082-2-rikard.falkeborn@gmail.com
Signed-off-by: Greg Kroah-Hartman
08 Jun, 2020
1 commit
-
Pull char/misc driver updates from Greg KH:
"Here is the large set of char/misc driver patches for 5.8-rc1Included in here are:
- habanalabs driver updates, loads
- mhi bus driver updates
- extcon driver updates
- clk driver updates (approved by the clock maintainer)
- firmware driver updates
- fpga driver updates
- gnss driver updates
- coresight driver updates
- interconnect driver updates
- parport driver updates (it's still alive!)
- nvmem driver updates
- soundwire driver updates
- visorbus driver updates
- w1 driver updates
- various misc driver updates
In short, loads of different driver subsystem updates along with the
drivers as well.All have been in linux-next for a while with no reported issues"
* tag 'char-misc-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (233 commits)
habanalabs: correctly cast u64 to void*
habanalabs: initialize variable to default value
extcon: arizona: Fix runtime PM imbalance on error
extcon: max14577: Add proper dt-compatible strings
extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()'
extcon: remove redundant assignment to variable idx
w1: omap-hdq: print dev_err if irq flags are not cleared
w1: omap-hdq: fix interrupt handling which did show spurious timeouts
w1: omap-hdq: fix return value to be -1 if there is a timeout
w1: omap-hdq: cleanup to add missing newline for some dev_dbg
/dev/mem: Revoke mappings when a driver claims the region
misc: xilinx-sdfec: convert get_user_pages() --> pin_user_pages()
misc: xilinx-sdfec: cleanup return value in xsdfec_table_write()
misc: xilinx-sdfec: improve get_user_pages_fast() error handling
nvmem: qfprom: remove incorrect write support
habanalabs: handle MMU cache invalidation timeout
habanalabs: don't allow hard reset with open processes
habanalabs: GAUDI does not support soft-reset
habanalabs: add print for soft reset due to event
habanalabs: improve MMU cache invalidation code
...
22 May, 2020
7 commits
-
DMA transfers to and from the SD card stall for 10 seconds and run into
timeout on RTS5260 card readers after ASPM was enabled.Adding a short msleep after disabling ASPM fixes the issue on several
Dell Precision 7530/7540 systems I tested.This function is only called when waking up after the chip went into
power-save after not transferring data for a few seconds. The added
msleep does therefore not change anything in data transfer speed or
induce any excessive waiting while data transfers are running, or the
chip is sleeping. Only the transition from sleep to active is affected.Signed-off-by: Klaus Doth
Cc: stable
Link: https://lore.kernel.org/r/4434eaa7-2ee3-a560-faee-6cee63ebd6d4@doth.eu
Signed-off-by: Greg Kroah-Hartman -
rts5249_set_aspm() and rts5260_set_aspm() do nothing more than the default
rtsx_comm_set_aspm() does, so remove them and use the default. No
functional change intended.Signed-off-by: Bjorn Helgaas
Link: https://lore.kernel.org/r/20200521180545.1159896-7-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman -
Simplify rtsx_comm_set_aspm() and remove the now-unused
rtsx_pci_enable_aspm().rtsx_pci_disable_aspm() is still used by rtsx_pci_init_hw().
Signed-off-by: Bjorn Helgaas
Link: https://lore.kernel.org/r/20200521180545.1159896-6-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman -
Instead of using the driver-specific rtsx_pci_update_cfg_byte() to update
the PCIe Link Control Register, use pcie_capability_clear_and_set_word()
like the rest of the kernel does. This makes it easier to maintain ASPM
across the PCI core and drivers.Remove the now-unused rtsx_pci_update_cfg_byte() and ASPM_MASK_NEG
definitions.No functional change intended.
Signed-off-by: Bjorn Helgaas
Link: https://lore.kernel.org/r/20200521180545.1159896-5-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman -
Use ASPM_MASK_NEG instead of hard-coded value, as other callers of
rtsx_pci_update_cfg_byte() do. No functional change intended.Signed-off-by: Bjorn Helgaas
Link: https://lore.kernel.org/r/20200521180545.1159896-4-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman -
The struct rtsx_cr_option.dev_aspm_mode member is never set to anything
other than DEV_ASPM_DYNAMIC (0). Remove it and code that tests it. No
functional change intended.Signed-off-by: Bjorn Helgaas
Link: https://lore.kernel.org/r/20200521180545.1159896-3-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman -
Remove the following unused function pointers from struct pcr_ops:
int (*set_ltr_latency)(struct rtsx_pcr *pcr, u32 latency);
int (*set_l1off_sub)(struct rtsx_pcr *pcr, u8 val);
void (*full_on)(struct rtsx_pcr *pcr);
void (*power_saving)(struct rtsx_pcr *pcr);Signed-off-by: Bjorn Helgaas
Link: https://lore.kernel.org/r/20200521180545.1159896-2-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman
23 Apr, 2020
1 commit
-
Change initial clock to improve compatibility for rts5261
Signed-off-by: Rui Feng
Link: https://lore.kernel.org/r/1586918237-3016-1-git-send-email-rui_feng@realsil.com.cn
Signed-off-by: Greg Kroah-Hartman
26 Mar, 2020
1 commit
-
rts522a should use rts522a_pcr_ops, which is
diffrent with rts5227 in phy/hw init setting.Fixes: ce6a5acc9387 ("mfd: rtsx: Add support for rts522A")
Signed-off-by: YueHaibing
Cc: stable
Link: https://lore.kernel.org/r/20200326032618.20472-1-yuehaibing@huawei.com
Signed-off-by: Greg Kroah-Hartman
18 Mar, 2020
1 commit
-
The TX/RX register should not be treated the same way to allow for better
support of tuning. Fix this by using a default initial value for TX.Signed-off-by: Ricky Wu
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200316025232.1167-1-ricky_wu@realtek.com
[Ulf: Updated changelog]
Signed-off-by: Ulf Hansson
Acked-by: Greg Kroah-Hartman
30 Jan, 2020
1 commit
-
Pull char/misc driver updates from Greg KH:
"Here is the big char/misc/whatever driver changes for 5.6-rc1Included in here are loads of things from a variety of different
driver subsystems:
- soundwire updates
- binder updates
- nvmem updates
- firmware drivers updates
- extcon driver updates
- various misc driver updates
- fpga driver updates
- interconnect subsystem and driver updates
- bus driver updates
- uio driver updates
- mei driver updates
- w1 driver cleanups
- various other small driver updatesAll of these have been in linux-next for a while with no reported
issues"* tag 'char-misc-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (86 commits)
mei: me: add jasper point DID
char: hpet: Use flexible-array member
binder: fix log spam for existing debugfs file creation.
mei: me: add comet point (lake) H device ids
nvmem: add QTI SDAM driver
dt-bindings: nvmem: add binding for QTI SPMI SDAM
dt-bindings: imx-ocotp: Add i.MX8MP compatible
dt-bindings: soundwire: fix example
soundwire: cadence: fix kernel-doc parameter descriptions
soundwire: intel: report slave_ids for each link to SOF driver
siox: Use the correct style for SPDX License Identifier
w1: omap-hdq: Simplify driver with PM runtime autosuspend
firmware: stratix10-svc: Remove unneeded semicolon
firmware: google: Probe for a GSMI handler in firmware
firmware: google: Unregister driver_info on failure and exit in gsmi
firmware: google: Release devices before unregistering the bus
slimbus: qcom: add missed clk_disable_unprepare in remove
slimbus: Use the correct style for SPDX License Identifier
slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel()
dt-bindings: SLIMBus: add slim devices optional properties
...
14 Jan, 2020
2 commits
-
I have added the AU6625 PCI_ID to the list of supported IDs:
alcor_pci.c
// Added au6625s ID to the array of supported devices
alcor_pci.h
// Added entry to define the PCI IDMade it fit in with the already submitted code:
alcor_pci.c
// Added config entry to that matches the one for au6601>From general usage there seems to be no problems.
Signed-off-by: Rhys Perry
Link: https://lore.kernel.org/r/20191229171824.10308-1-rhysperry111@gmail.com
Signed-off-by: Greg Kroah-Hartman -
A u8 can only go up to 255, condition n > 396 is
impossible, so change u8 to u16.Signed-off-by: Rui Feng
Link: https://lore.kernel.org/r/1574214006-13540-1-git-send-email-rui_feng@realsil.com.cn
Signed-off-by: Greg Kroah-Hartman
06 Jan, 2020
1 commit
-
ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.Signed-off-by: Christoph Hellwig
Acked-by: Arnd Bergmann
14 Nov, 2019
1 commit
-
Add support for new chip rts5261.
In order to support rts5261, the definitions of some internal registers
and workflow have to be modified and are different from its predecessors.
So we need this patch to ensure RTS5261 can work.Signed-off-by: Rui Feng
Link: https://lore.kernel.org/r/1571645105-5028-1-git-send-email-rui_feng@realsil.com.cn
Signed-off-by: Greg Kroah-Hartman
10 Oct, 2019
1 commit
-
rts5260_card_power_on do not need local variable to store different value,
Hence just remove it.Signed-off-by: zhong jiang
Link: https://lore.kernel.org/r/1568307841-44065-1-git-send-email-zhongjiang@huawei.com
Signed-off-by: Greg Kroah-Hartman
25 Jul, 2019
1 commit
-
Instead of using to_pci_dev + pci_get_drvdata,
use dev_get_drvdata to make code simpler.Signed-off-by: Chuhong Yuan
Link: https://lore.kernel.org/r/20190723124649.24728-1-hslester96@gmail.com
Signed-off-by: Greg Kroah-Hartman
19 Jun, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation this program is
distributed in the hope that it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more details you should have received a copy of the gnu general
public license along with this program if not see http www gnu org
licensesextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 503 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Alexios Zavras
Reviewed-by: Allison Randal
Reviewed-by: Enrico Weigelt
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190602204653.811534538@linutronix.de
Signed-off-by: Greg Kroah-Hartman
21 May, 2019
2 commits
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 or at your option any
later version this program is distributed in the hope that it will
be useful but without any warranty without even the implied warranty
of merchantability or fitness for a particular purpose see the gnu
general public license for more details you should have received a
copy of the gnu general public license along with this program if
not see http www gnu org licensesextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 13 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Steve Winslow
Reviewed-by: Jilayne Lovejoy
Reviewed-by: Kate Stewart
Reviewed-by: Allison Randal
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190519154042.236620792@linutronix.de
Signed-off-by: Greg Kroah-Hartman -
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:GPL-2.0-only
Signed-off-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
08 May, 2019
1 commit
-
…/git/gregkh/char-misc
Pull char/misc update part 2 from Greg KH:
"Here is the "real" big set of char/misc driver patches for 5.2-rc1Loads of different driver subsystem stuff in here, all over the places:
- thunderbolt driver updates
- habanalabs driver updates
- nvmem driver updates
- extcon driver updates
- intel_th driver updates
- mei driver updates
- coresight driver updates
- soundwire driver cleanups and updates
- fastrpc driver updates
- other minor driver updates
- chardev minor fixupsFeels like this tree is getting to be a dumping ground of "small
driver subsystems" these days. Which is fine with me, if it makes
things easier for those subsystem maintainers.All of these have been in linux-next for a while with no reported
issues"* tag 'char-misc-5.2-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (255 commits)
intel_th: msu: Add current window tracking
intel_th: msu: Add a sysfs attribute to trigger window switch
intel_th: msu: Correct the block wrap detection
intel_th: Add switch triggering support
intel_th: gth: Factor out trace start/stop
intel_th: msu: Factor out pipeline draining
intel_th: msu: Switch over to scatterlist
intel_th: msu: Replace open-coded list_{first,last,next}_entry variants
intel_th: Only report useful IRQs to subdevices
intel_th: msu: Start handling IRQs
intel_th: pci: Use MSI interrupt signalling
intel_th: Communicate IRQ via resource
intel_th: Add "rtit" source device
intel_th: Skip subdevices if their MMIO is missing
intel_th: Rework resource passing between glue layers and core
intel_th: SPDX-ify the documentation
intel_th: msu: Fix single mode with IOMMU
coresight: funnel: Support static funnel
dt-bindings: arm: coresight: Unify funnel DT binding
coresight: replicator: Add new device id for static replicator
...
26 Apr, 2019
1 commit
-
this patch fixes rts5260 power saving parameter
make power saving function work on L1.1, L1.2Signed-off-by: RickyWu
Signed-off-by: Greg Kroah-Hartman
28 Mar, 2019
1 commit
-
These lines weren't indented far enough.
Signed-off-by: Dan Carpenter
Signed-off-by: Greg Kroah-Hartman
26 Feb, 2019
1 commit
-
this enables and adds OCP function for Realtek A series cardreader chips
and fixes some OCP flow in rts5260.cSigned-off-by: RickyWu
Signed-off-by: Greg Kroah-Hartman
17 Dec, 2018
1 commit
-
There are spelling mistakes in a couple of dev_dbg messages, fix these.
Signed-off-by: Colin Ian King
Reviewed-by: Oleksij Rempel
Signed-off-by: Ulf Hansson