aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2016-05-17Merge branch 'for-4.7/pwm-atomic' into for-nextThierry Reding19-131/+307
2016-05-17Merge branch 'for-4.7/pwm-regulator' into for-nextThierry Reding1-6/+14
2016-05-17Merge branch 'for-4.7/pwm-args' into for-nextThierry Reding3-8/+22
2016-05-17pwm: Add information about polarity, duty cycle and period to debugfsHeiko Stübner1-0/+5
The PWM states make it possible to also output the polarity, duty cycle and period information in the debugfs summary output. This simplifies gathering information about PWMs without needing to walk through the sysfs attributes of every PWM. Signed-off-by: Heiko Stuebner <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> [[email protected]: use more spaces in debugfs output] Signed-off-by: Thierry Reding <[email protected]>
2016-05-17pwm: Switch to the atomic APIBoris Brezillon2-12/+41
Replace legacy pwm_get/set_xxx() and pwm_config/enable/disable() calls by pwm_get/apply_state(). Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17pwm: Add core infrastructure to allow atomic updatesBoris Brezillon1-68/+119
Add an ->apply() method to the pwm_ops struct to allow PWM drivers to implement atomic updates. This method is preferred over the ->enable(), ->disable() and ->config() methods if available. Add the pwm_apply_state() function to the PWM user API. Note that the pwm_apply_state() does not guarantee the atomicity of the update operation, it all depends on the availability and implementation of the ->apply() method. pwm_enable/disable/set_polarity/config() are now implemented as wrappers around the pwm_apply_state() function. pwm_adjust_config() is allowing smooth handover between the bootloader and the kernel. This function tries to adapt the current PWM state to the PWM arguments coming from a PWM lookup table or a DT definition without changing the duty_cycle/period proportion. Signed-off-by: Boris Brezillon <[email protected]> [[email protected]: fix a couple of typos] Signed-off-by: Thierry Reding <[email protected]>
2016-05-17pwm: Add hardware readout infrastructureBoris Brezillon1-0/+3
Add a ->get_state() function to the pwm_ops struct to let PWM drivers initialize the PWM state attached to a PWM device. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17pwm: Move the enabled/disabled info into pwm_stateBoris Brezillon1-4/+9
Prepare the transition to PWM atomic update by moving the enabled and disabled state into the pwm_state struct. This way we can easily update the whole PWM state by copying the new state in the ->state field. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17pwm: Introduce the pwm_state conceptBoris Brezillon1-4/+4
The PWM state, represented by its period, duty_cycle and polarity is currently directly stored in the PWM device. Declare a pwm_state structure embedding those field so that we can later use this struct to atomically update all the PWM parameters at once. All pwm_get_xxx() helpers are now implemented as wrappers around pwm_get_state(). Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17pwm: Keep PWM state in sync with hardware stateBoris Brezillon1-14/+0
Before the introduction of pwm_args, the core was resetting the PWM period and polarity states to the reference values (those provided through the DT, a PWM lookup table or hardcoded in the driver). Now that all PWM users are correctly using pwm_args to configure their PWM device, we can safely remove the pwm_apply_args() call in pwm_get() and of_pwm_get(). We can also get rid of the pwm_set_period() call in pwm_apply_args(), because PWM users are now directly using pargs->period instead of pwm_get_period(). By doing that we avoid messing with the current PWM period. The only remaining bit in pwm_apply_args() is the initial polarity setting, and it should go away when all PWM users have been patched to use the atomic API (with this API the polarity will be set along with other PWM arguments when configuring the PWM). Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17drm: i915: Explicitly apply PWM config extracted from pwm_argsBoris Brezillon1-0/+6
Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17input: misc: pwm-beeper: Explicitly apply PWM config extracted from pwm_argsBoris Brezillon1-0/+6
Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17input: misc: max8997: Explicitly apply PWM config extracted from pwm_argsBoris Brezillon1-0/+6
Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17backlight: lm3630a: explicitly apply PWM config extracted from pwm_argsBoris Brezillon1-0/+6
Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17backlight: lp855x: Explicitly apply PWM config extracted from pwm_argsBoris Brezillon1-0/+6
Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17backlight: lp8788: Explicitly apply PWM config extracted from pwm_argsBoris Brezillon1-0/+6
Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17backlight: pwm_bl: Use pwm_get_args() where appropriateBoris Brezillon1-1/+9
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17fbdev: ssd1307fb: Use pwm_get_args() where appropriateBoris Brezillon1-1/+10
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17regulator: pwm: Use pwm_get_args() where appropriateBoris Brezillon1-6/+14
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17leds: pwm: Use pwm_get_args() where appropriateBoris Brezillon1-1/+10
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Jacek Anaszewski <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17input: misc: max77693: Use pwm_get_args() where appropriateBoris Brezillon1-3/+14
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17hwmon: pwm-fan: Use pwm_get_args() where appropriateBoris Brezillon1-6/+20
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Kamil Debski <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17clk: pwm: Use pwm_get_args() where appropriateBoris Brezillon1-5/+12
The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Stephen Boyd <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17pwm: Use pwm_get/set_xxx() helpers where appropriateBoris Brezillon4-4/+5
Use pwm_get/set_xxx() helpers instead of directly accessing the pwm->xxx field. Doing that will ease adaptation of the PWM framework to support atomic update. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17pwm: Get rid of pwm->lockBoris BREZILLON2-19/+24
PWM devices are not protected against concurrent accesses. The lock in struct pwm_device might let PWM users think it is, but it's actually only protecting the enabled state. Removing this lock should be fine as long as all PWM users are aware that accesses to the PWM device have to be serialized, which seems to be the case for all of them except the sysfs interface. Patch the sysfs code by adding a lock to the pwm_export struct and making sure it's taken for all relevant accesses to the exported PWM device. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17backlight: lm3630a_bl: Stop messing with the pwm->period fieldBoris BREZILLON1-2/+1
pwm->period field is not supposed to be changed by PWM users. The only ones authorized to change it are the PWM core and PWM drivers. Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17backlight: pwm_bl: Remove useless call to pwm_set_period()Boris BREZILLON1-3/+1
The PWM period will be set when calling pwm_config. Remove this useless call to pwm_set_period(), which might mess up the internal PWM state. Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17pwm: rcar: Make use of pwm_is_enabled()Boris BREZILLON1-1/+1
Commit 5c31252c4a86 ("pwm: Add the pwm_is_enabled() helper") introduced a new function to test whether a PWM device is enabled or not without manipulating PWM internal fields. Hiding this is necessary if we want to smoothly move to the atomic PWM config approach without impacting PWM drivers. Fix this driver to use pwm_is_enabled() instead of directly accessing the ->flags field. Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2016-05-17pwm: Fix pwm_apply_args() call sitesBoris Brezillon1-10/+17
pwm_apply_args() is supposed to initialize a PWM device according to the arguments provided by the DT or the PWM lookup, but this function was called inside pwm_device_request(), which in turn was called before the core had a chance to initialize the pwm->args fields. Fix that by calling pwm_apply_args directly in pwm_get() and of_pwm_get() after initializing pwm->args field. This commit also fixes an invalid pointer dereference introduced by commit e39c0df1be5a ("pwm: Introduce the pwm_args concept"). Signed-off-by: Boris Brezillon <[email protected]> Fixes: e39c0df1be5a ("pwm: Introduce the pwm_args concept") Signed-off-by: Thierry Reding <[email protected]>
2016-05-17Merge branch 'for-4.7/wacom' into for-linusJiri Kosina3-7/+10
2016-05-17Merge branch 'for-4.7/upstream' into for-linusJiri Kosina5-24/+31
Conflicts: drivers/hid/usbhid/hid-quirks.c
2016-05-17Merge branches 'for-4.6/upstream-fixes', 'for-4.7/asus', 'for-4.7/hidraw' ↵Jiri Kosina3298-126827/+229922
and 'for-4.7/thingm' into for-linus
2016-05-17iscsi-target: Fix early sk_data_ready LOGIN_FLAGS_READY raceNicholas Bellinger1-9/+9
There is a iscsi-target/tcp login race in LOGIN_FLAGS_READY state assignment that can result in frequent errors during iscsi discovery: "iSCSI Login negotiation failed." To address this bug, move the initial LOGIN_FLAGS_READY assignment ahead of iscsi_target_do_login() when handling the initial iscsi_target_start_negotiation() request PDU during connection login. As iscsi_target_do_login_rx() work_struct callback is clearing LOGIN_FLAGS_READ_ACTIVE after subsequent calls to iscsi_target_do_login(), the early sk_data_ready ahead of the first iscsi_target_do_login() expects LOGIN_FLAGS_READY to also be set for the initial login request PDU. As reported by Maged, this was first obsered using an MSFT initiator running across multiple VMWare host virtual machines with iscsi-target/tcp. Reported-by: Maged Mokhtar <[email protected]> Tested-by: Maged Mokhtar <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2016-05-17qxl: catch qxlfb_create_pinned_object failuresGerd Hoffmann1-0/+3
Signed-off-by: Gerd Hoffmann <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-17drm/exynos/hdmi: add a missing tabDan Carpenter1-1/+1
Smatch warns that the if statement isn't indented. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/20160512195457.GA19095@mwanda
2016-05-17drm/fb-cma-helper: Add function drm_fb_cma_create_with_funcs()Noralf Trønnes1-6/+25
Add drm_fb_cma_create_with_funcs() for drivers that need to set the dirty() callback. Signed-off-by: Noralf Trønnes <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-17drm/fb-cma-helper: Use const for drm_framebuffer_funcs argumentNoralf Trønnes1-2/+2
drm_framebuffer_init() uses const for the drm_framebuffer_funcs argument so use that on drm_fb_cma_alloc() and drm_fbdev_cma_create_with_funcs() as well. Cc: [email protected] Signed-off-by: Noralf Trønnes <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-17drm: Drop connector argument from __drm_atomic_helper_connector_destroy_stateDaniel Vetter1-6/+3
It's unused, and really this helper should only look at the state structure and nothing else. Note that this conflicts with a patch from Dave that adds refcounting to drm_connectors. It's not yet clear whether the check Dave adds for connector != NULL is really needed or the right check. v2: Fix commmit message (Laurent). Cc: Dave Airlie <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-17drm: Drop plane argument from __drm_atomic_helper_plane_destroy_stateDaniel Vetter9-14/+12
It's unused, and really this helper should only look at the state structure and nothing else. v2: Fix commit message (Laurent). v3: Rebase onto mtk driver merge. Cc: Maarten Lankhorst <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Inki Dae <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Mark Yao <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Acked-by: Eric Anholt <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-17drm: Drop crtc argument from __drm_atomic_helper_crtc_destroy_stateDaniel Vetter7-13/+11
It's unused, and really this helper should only look at the state structure and nothing else. v2: Rebase on top of rockchip changes v3: Drop unrelated hunk, spotted by Laurent. v4: Rebase onto mtk driver merge. Cc: Maarten Lankhorst <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Mark Yao <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Acked-by: Eric Anholt <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-17drm: Remove unused drm_device from drm_gem_object_lookup()Chris Wilson64-144/+133
drm_gem_object_lookup() has never required the drm_device for its file local translation of the user handle to the GEM object. Let's remove the unused parameter and save some space. Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected] Cc: Dave Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> [danvet: Fixup kerneldoc too.] Signed-off-by: Daniel Vetter <[email protected]>
2016-05-17Merge branch 'ovl-fixes' into for-linusAl Viro328-1802/+3451
Backmerge to resolve a conflict in ovl_lookup_real(); "ovl_lookup_real(): use lookup_one_len_unlocked()" instead, but it was too late in the cycle to rebase.
2016-05-16cxgbit: Use type ISCSI_CXGBIT + cxgbit tpg_np attributeNicholas Bellinger2-8/+8
Instead of having cxgbit use type ISCSI_HW_OFFLOAD + 'hw_offload' tpg_np attribute, it should be using it's own driver specific type + attribute Cc: Varun Prakash <[email protected]> Cc: Hariprasad Shenai <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Sagi Grimberg <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2016-05-16iscsi-target: Convert transport drivers to signal rdma_shutdownNicholas Bellinger3-6/+6
Instead of special casing the handful of callers that check for iser-target rdma verbs specific shutdown, use a simple flag at iscsit_transport->rdma_shutdown so each driver can signal this. Also, update iscsi-target/tcp + cxgbit to rdma_shutdown = false. Cc: Varun Prakash <[email protected]> Cc: Hariprasad Shenai <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Sagi Grimberg <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2016-05-16iscsi-target: Make iscsi_tpg_np driver show/store use generic codeNicholas Bellinger1-158/+41
Go ahead and fold the duplicate iscsi_tpg_np driver attribute show/store functions into generic callers, invoked by current driver specific functions. This allows for future v4.8+ changes to have iscsi_target_mod use tpg_np driver attributes at runtime, instead of having the defaults hardcoded in iscsi_target_configfs.c. Also, drop the unused/legacy 'sctp' attribute for non standard RFC-3720 operation with IPPROTO_SCTP. Cc: Varun Prakash <[email protected]> Cc: Hariprasad Shenai <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Sagi Grimberg <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2016-05-17Merge branch 'topic/xilinx' into for-linusVinod Koul2-368/+1297
2016-05-17Merge branch 'topic/tegra' into for-linusVinod Koul4-2/+869
2016-05-17Merge branch 'topic/sun6i' into for-linusVinod Koul1-66/+188
2016-05-17Merge branch 'topic/qcom' into for-linusVinod Koul7-43/+1291
2016-05-17Merge branch 'topic/pxa' into for-linusVinod Koul1-2/+14