summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2014-11-18xattr: Constify ->name member of "struct xattr".Tetsuo Handa3-6/+6
Since everybody sets kstrdup()ed constant string to "struct xattr"->name but nobody modifies "struct xattr"->name , we can omit kstrdup() and its failure checking by constifying ->name member of "struct xattr". Change-Id: I6cb5cd7f29c01956dd0d1579af81a518a5936071 Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Reviewed-by: Joel Becker <jlbec@evilplan.org> [ocfs2] Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com> Acked-by: Casey Schaufler <casey@schaufler-ca.com> Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com> Reviewed-by: Paul Moore <paul@paul-moore.com> Tested-by: Paul Moore <paul@paul-moore.com> Acked-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <james.l.morris@oracle.com> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2014-11-18Security: Add Hook to test if the particular xattr is part of a MAC model.David Quigley1-0/+14
The interface to request security labels from user space is the xattr interface. When requesting the security label from an NFS server it is important to make sure the requested xattr actually is a MAC label. This allows us to make sure that we get the desired semantics from the attribute instead of something else such as capabilities or a time based LSM. Change-Id: I283f116953f958877826ba772661b5755986ac99 Acked-by: Eric Paris <eparis@redhat.com> Acked-by: James Morris <james.l.morris@oracle.com> Signed-off-by: Matthew N. Dodd <Matthew.Dodd@sparta.com> Signed-off-by: Miguel Rodel Felipe <Rodel_FM@dsi.a-star.edu.sg> Signed-off-by: Phua Eu Gene <PHUA_Eu_Gene@dsi.a-star.edu.sg> Signed-off-by: Khin Mi Mi Aung <Mi_Mi_AUNG@dsi.a-star.edu.sg> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2014-11-18cpufreq:LAB: Introduce new cpufreq LAB(Legaccy Application Boost) governorJonghwa Lee1-0/+3
This patch introduces new cpufreq governor named 'LAB'. LAB governor will use scheduler, per-CPU information to determine how many CPUs are in busy now. As a result the number of idle CPUs is calculated for current load (digital low pass filtering is used to provide more stable results). It will determine next frequency. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Conflicts: drivers/cpufreq/cpufreq_governor.c Resolved-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2014-11-18pwm: Add PWM polarity flag macro for DTLaurent Pinchart1-0/+14
Define a PWM_POLARITY_INVERTED macro in include/dt-bindings/pwm/pwm.h to be used by device tree sources. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2014-11-18pwm: Add new pwm-samsung driverTomasz Figa1-0/+7
This patch introduces new Samsung PWM driver, which is completely rewritten to be multiplatform- and DeviceTree-aware. In addition, remaining problems of old driver are fixed, such as: - proper handling of hardware variants, - synchronization on SMP systems, - handling of boundary parameter values, - hardware sharing with PWM clocksource driver, - undefined state of PWM output after stopping PWM channel. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Tested-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Mark Brown <broonie@linaro.org> Tested-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thierry Reding <thierry.reding@gmail.com>
2014-11-18pwm: Add sysfs interfaceH Hartley Sweeten1-1/+28
Add a simple sysfs interface to the generic PWM framework. /sys/class/pwm/ `-- pwmchipN/ for each PWM chip |-- export (w/o) ask the kernel to export a PWM channel |-- npwm (r/o) number of PWM channels in this PWM chip |-- pwmX/ for each exported PWM channel | |-- duty_cycle (r/w) duty cycle (in nanoseconds) | |-- enable (r/w) enable/disable PWM | |-- period (r/w) period (in nanoseconds) | `-- polarity (r/w) polarity of PWM (normal/inversed) `-- unexport (w/o) return a PWM channel to the kernel Based on work by Lars Poeschel. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Lars Poeschel <poeschel@lemonage.de> Cc: Ryan Mallon <rmallon@gmail.com> Cc: Rob Landley <rob@landley.net> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2014-11-18thermal: Add ommitted codes from merging.Jonghwa Lee1-0/+18
Add omitted codes from commits, <commit-id d9e6913d1> "drivers: thermal: add check when ~ ", and <commit-id efbf8d7a3> "thermal: thermal_core: allow binding with ~" Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-11-18BOOST: Core code compliant with v9 of the patchLukasz Majewski1-1/+1
Update the BOOST framework core to be compliant with v9 version of the patch Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
2014-11-18thermal:boost: Automatic enable/disable of BOOST featureLukasz Majewski1-0/+2
This patch provides auto disable/enable operation for boost. When any defined trip point is passed, the boost is disabled. In that moment thermal monitor workqueue is woken up and it monitors if the device temperature drops below 75% of the smallest trip point. When device cools down, the boost is enabled again. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Changes for v6: - Disable boost only when supported and enabled - Protect boost related thermal_zone_device struct fields with mutex - Evaluate temperature trend during boost enable decision - Create separate methods to handle boost enable/disable (thermal_boost_{enable|disable}) operations - Boost is disabled at any trip point passage (not only the non critical one) Changes for v5: - Move boost disable code from cpu_cooling.c to thermal_core.c (to handle_non_critical_trips) - Extent struct thermal_zone_device by adding overheated bool flag - Implement auto enable of boost after device cools down - Introduce boost_polling flag, which indicates if thermal uses it's predefined pool delay or has woken up thermal workqueue only to wait until device cools down. Changes for v4: - New patch
2014-11-18cpufreq: Add boost frequency support in coreLukasz Majewski1-0/+12
This commit adds boost frequency support in cpufreq core (Hardware & Software). Some SoC (like Exynos4 - e.g. 4x12) allow setting frequency above its normal operation limits. Such a mode shall be only used for a short time. Overclocking (boost) support is essentially provided by platform dependent cpufreq driver. This commit unifies support for SW and HW (Intel) overclocking solutions in the core cpufreq driver. Previously the "boost" sysfs attribute was defined at acpi driver code. By default boost is disabled. One global attribute is available at: /sys/devices/system/cpu/cpufreq/boost. It only shows up when cpufreq driver supports overclocking. Under the hood frequencies dedicated for boosting are marked with a special flag (CPUFREQ_BOOST_FREQ) at driver's frequency table. It is the user's concern to enable/disable overclocking with proper call to sysfs. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Changes for v6: - Remove sysfs boost attribute when subsys_iterface_unregister() fails - Move global boost_enabled variable from cpufreq.c to platform dependent struct cpufreq_driver - pr_err() message is also printed when boost disable fails Changes for v5: - Rename cpufreq_boost_trigger_state_sw() to cpufreq_boost_enable_sw() - Extent cpufreq_register_driver() to check if cpufreq driver provided boost_enable callback. If not provided, then use cpufreq_boost_enable_sw() - Use single call to cpufreq_driver->enable_boost() with cpufreq driver provided callback or default SW boost enable routine - Move pr_debug call to store_boost() from cpufreq_boost_trigger_state() - Change the user_policy.max value when SW boost is toggled. It is necessary for proper operation of e.g. thermal subsystem. - Add check if cpufreq_driver pointer is not NULL at cpufreq_boost_supported() routine - Add EXPORT_SYMBOL_GPL for cpufreq_boost_supported() and cpufreq_boost_enabled() - Remove extra check for cpufreq_boost_supported() at cpufreq_freq_table_cpuinfo() - Explanation of show boost logic at show_available_freqs() - Add cpufreq_set_boost_enabled() method to set initial value of boost_enabled global flag Changes for v4: - Remove boost parameter from cpufreq_frequency_table_cpuinfo() function - Introduce cpufreq_boost_supported() method - Use of cpufreq_boost_supported() and cpufreq_boost_enabled() to decide if frequency shall be skipped - Rename set_boost_freq() to enable_boost() - cpufreq_attr_available_freq() moved to freq_table.c - Use policy list to get access to cpufreq policies - Rename global boost flag (cpufreq_boost_enabled -> boost_enabled) - pr_err corrected ( %sable) - Remove sanity check at cpufreq_boost_trigger_state() entrance [to test if boost is supported] - Use either HW (boost_enable) callback or SW managed boost - Introduce new cpufreq_boost_trigger_state_sw() method to handle boost at SW. - Protect boost_enabled manipulation with lock. Changes for v3: - Method for reading boost status - Removal of cpufreq_frequency_table_max() - Extent cpufreq_frequency_table_cpuinfo() to support boost parameter - boost_supported flag added to cpufreq_driver struct - "boost" sysfs attribute control flag removed - One global flag describing state of the boost defined at cpufreq core - Rename cpufreq_driver's low_level_boost field to set_boost_freq() - Usage of cpufreq_sysfs_{remove|add}_file() routines Changes for v2: - Removal of cpufreq_boost structure and move its fields to cpufreq_driver structure - Flag to indicate if global boost attribute is already defined - Extent the pr_{err|debbug} functions to show current function names
2014-11-18cpufreq: Store cpufreq policies in a listLukasz Majewski1-0/+1
Policies available in a cpufreq framework are now linked together. They are accessible via cpufreq_policy_list defined at cpufreq core. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Changes for v6: - Move policy list entry delete code to __cpufreq_remove_dev() Changes for v5: - Call list_add() only when device successfully added Changes for v4: - New patch
2014-11-18cpufreq: Don't create empty /sys/devices/system/cpu/cpufreq directoryViresh Kumar1-0/+4
When we don't have any file in cpu/cpufreq directory we shouldn't create it. Specially with the introduction of per-policy governor instance patchset, even governors are moved to cpu/cpu*/cpufreq/governor-name directory and so this directory is just not required. Lets have it only when required. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-11-18mmc: dw_mmc: add the platdat for descriptor number.Jaehoon Chung1-0/+4
This platdata is related with buffer size. It's increaed the performance. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2014-11-18charger-manager: Parse charger_desc from device tree.Jonghwa Lee1-5/+5
With this patch, charger-manager can support device tree fully. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-11-18charger-manager : Add default battery temperature checking funtion.Jonghwa Lee1-1/+10
During the charger manager driver's probing time, it can't succeed if there's no pre-defined .temperature_out_of_range callback function. But if fuel gauge supports battery temperature measurement, we can use it directly. That's what cm_default_get_temp() function does. With flag measure_batter_temp ON, we normally use cm_default_get_temp() for .temperature_out_of_range callback funtion. The TEMP_AMBIENT property is only used for pre-defined one. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-11-18extcon: Add an API to get extcon device from dt nodeKishon Vijay Abraham I1-0/+31
Added an API of_extcon_get_extcon_dev() to be used by drivers to get extcon device in the case of dt boot (this can be used instead of extcon_get_extcon_dev()). Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
2014-11-18charger: max77693: Fix initial charger configuration properly.Jonghwa Lee1-8/+19
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-11-18charger: max77693: code cleaningJonghwa Lee1-10/+13
- Remove duplicated macro data. - Improve readability. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-11-18exynos_drm: replace enums by __u32 in structs used in IOCTLsAndrzej Hajda1-7/+7
enum type has variable size depending on compiler options, so it should be avoided in structs passed to userland. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
2014-11-18usb:gadget: Refcount for gadget pullupLukasz Majewski1-2/+11
This commit fixes the way gadget's pullup method (wrapped at usb_gadget_connect/disconnect) is called in the udc-core. The composite driver allows correct driver registration, even when it calls the usb_gadget_disconnect method (composite driver configuration is defered for user space - please look into the description of usb_composite_probe at composite.c - line: 1623) One such example is the CCG (Configurable Composite Gadget) driver (at drivers/staging/ccg), which after its registration has no usb descriptor (i.e. idProduct, idVendor etc.) and functions registered. Those are configured after writing to /sys/module/g_ccg/parameters/ or /sys/class/ccg_usb/ccg0/. Unfortunately, the code at 'usb_gadget_probe_driver' method (some code omitted): if (udc_is_newstyle(udc)) { bind(udc->gadget); usb_gadget_udc_start(udc->gadget, driver); usb_gadget_connect(udc->gadget); } Explicitly calls the usb_gadget_connect method for this driver. It looks like the udc-core enables pullup for a driver, which has no functions and no descriptor filled (those values are feed from userspace). The USB composite driver API allows correct driver registration with calling usb_gadget_disconnect method, but as it is now, _ALL_ newstyle usb gadgets are connected by default. Therefore it violates the composite API. The solution (at least until the udc-core is reworked) is to add atomic variable, which helps in balancing the number of called usb_gadget_connect/ disconnect functions. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2014-11-18regulator: max77686: Support DVS control in max77686 regulator.Jonghwa Lee1-0/+2
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
2014-11-18V4L: Add mem2mem ioctl and file operation helpersSylwester Nawrocki2-0/+28
This patch adds ioctl helpers to the V4L2 mem-to-mem API, so we can avoid several ioctl handlers in the mem-to-mem video node drivers that are simply a pass-through to the v4l2_m2m_* calls. These helpers will only be useful for drivers that use same mutex for both OUTPUT and CAPTURE queue, which is the case for all currently in tree v4l2 m2m drivers. In order to use the helpers the drivers are required to use struct v4l2_fh. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- Changes since v1: - added v4l2_m2m_ioctl_create_buf().
2014-11-18drm: Add drm backlight subsystem supportDonghwa Lee1-0/+26
Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
2014-11-18extcon: max77693: Define dock constant to remove compile errorChanwoo Choi1-0/+8
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2014-11-18extcon: Add extcon-port driver to maintain compatibility with old jack driverChanwoo Choi1-0/+46
This patch add extcon-port driver which maintain compatibility with old JACK driver(drivers/misc/jack.c). extcon-port driver send uevent to user-space when receive notification of cable state from EXTCON. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Conflicts: drivers/extcon/Kconfig drivers/extcon/Makefile
2014-11-18dmaengine: dma_slave_caps: remove sg entriesVinod Koul1-8/+0
As pointed by Russell in [1], the sg properties are already availble in struct device, so no need to duplicate here. [1]: http://marc.info/?l=linux-omap&m=137416733628831 Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-11-18dmaengine: make dma_submit_error() return an error codeDan Carpenter1-1/+4
The problem here is that the dma_xfer() functions in drivers/ata/pata_arasan_cf.c and drivers/mtd/nand/fsmc_nand.c expect dma_submit_error() to return an error code so they return 1 when they intended to return a negative. So far as I can tell, none of the ->tx_submit() functions ever do return error codes so this patch should have no effect in the current code. I also changed it from a define to an inline. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Dan Williams <djbw@fb.com>
2014-11-18dmaengine: add interface of dma_get_slave_channelZhangfei Gao1-0/+1
Suggested by Arnd, add dma_get_slave_channel interface Dma host driver could get specific channel specificied by request line, rather than filter. host example: static struct dma_chan *xx_of_dma_simple_xlate(struct of_phandle_args *dma_spec, struct of_dma *ofdma) { struct xx_dma_dev *d = ofdma->of_dma_data; unsigned int request = dma_spec->args[0]; if (request > d->dma_requests) return NULL; return dma_get_slave_channel(&(d->chans[request].vc.chan)); } probe: of_dma_controller_register((&op->dev)->of_node, xx_of_dma_simple_xlate, d); Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-11-18dmaengine: add dma_slave_get_caps apiVinod Koul1-0/+44
add new device callback .device_slave_caps api which can be used by clients to query the dma channel capablties before they program the channel. This can help is removing errors during the channel programming. Also add helper dma_slave_get_caps API This patch folds the work done by Matt earlier https://patchwork.kernel.org/patch/2094891/ Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-11-18video: exynos_dsi: Use generic PHY driverSylwester Nawrocki2-9/+1
Use the generic PHY API instead of the platform callback to control the MIPI DSIM DPHY. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- Changes since v4: - updated to latest version of the PHY framework - removed PHY labels.
2014-11-18[media] exynos4-is: Use the generic MIPI CSIS PHY driverSylwester Nawrocki1-9/+0
Use the generic PHY API instead of the platform callback to control the MIPI CSIS DPHY. The 'phy_label' field is added to the platform data structure to allow PHY lookup on non-dt platforms Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> --- Changes since v4: - updated to latest version of the PHY framework - removed PHY labels.
2014-11-18drivers: phy: add generic PHY frameworkKishon Vijay Abraham I1-0/+270
The PHY framework provides a set of APIs for the PHY drivers to create/destroy a PHY and APIs for the PHY users to obtain a reference to the PHY with or without using phandle. For dt-boot, the PHY drivers should also register *PHY provider* with the framework. PHY drivers should create the PHY by passing id and ops like init, exit, power_on and power_off. This framework is also pm runtime enabled. The documentation for the generic PHY framework is added in Documentation/phy.txt and the documentation for dt binding can be found at Documentation/devicetree/bindings/phy/phy-bindings.txt Cc: Tomasz Figa <t.figa@samsung.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-11-18Revert "drivers: phy: add generic PHY framework"Sylwester Nawrocki1-344/+0
This reverts commit 528bac1d1f2a8bb10ebc3e56dd8f22e2d76f197f. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-11-18Revert "[media] exynos4-is: Use the generic MIPI CSIS PHY driver"Sylwester Nawrocki1-2/+9
This reverts commit 88d0875e5d8cb005a3c21dff52581b08b6fd22eb. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-11-18Revert "video: exynos_dsi: Use generic PHY driver"Sylwester Nawrocki1-0/+5
This reverts commit 304105d59b61ac6800a274cdcf8f618b5007456a. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-11-18Revert "s5k5baf: add camera sensor driver"Sylwester Nawrocki2-24/+0
This reverts commit 80ca90cdf56ed7a375e31275fde4282e22f8edba. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2014-11-18[media] media: OF: add "sync-on-green-active" propertyLad, Prabhakar1-0/+3
This patch adds 'sync-on-green-active' property as part of endpoint property. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] V4L: Merge struct v4l2_async_subdev_list with struct v4l2_subdevSylwester Nawrocki2-21/+7
By integrating the v4l2-async API internals a bit more with the core overall the v4l2-async code becomes a bit simpler and easier to follow. Acked-and-tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] V4L: Rename subdev field of struct v4l2_async_notifierSylwester Nawrocki1-2/+2
This is a purely cosmetic change. Since the 'subdev' member points to an array of subdevs make it more explicit by renaming to the plural form. Acked-and-tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] V4L: Add V4L2_ASYNC_MATCH_OF subdev matching typeSylwester Nawrocki1-0/+5
Add support for matching by device_node pointer. This allows the notifier user to simply pass a list of device_node pointers corresponding to sub-devices. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] V4L: Rename v4l2_async_bus_* to v4l2_async_match_*Sylwester Nawrocki1-6/+6
enum v4l2_async_bus_type also selects a method subdevs are matched in the notification handlers, rename it to v4l2_async_match_type so V4L2_ASYNC_MATCH_OF entry can be further added for matching by device tree node pointer. Acked-and-tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-11-18[media] V4L2: support asynchronous subdevice registrationGuennadi Liakhovetski2-0/+113
Currently bridge device drivers register devices for all subdevices synchronously, typically, during their probing. E.g. if an I2C CMOS sensor is attached to a video bridge device, the bridge driver will create an I2C device and wait for the respective I2C driver to probe. This makes linking of devices straight forward, but this approach cannot be used with intrinsically asynchronous and unordered device registration systems like the Flattened Device Tree. To support such systems this patch adds an asynchronous subdevice registration framework to V4L2. To use it respective (e.g. I2C) subdevice drivers must register themselves with the framework. A bridge driver on the other hand must register notification callbacks, that will be called upon various related events. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2014-11-18[media] V4L2: add a device pointer to struct v4l2_subdevGuennadi Liakhovetski1-0/+2
It is often useful to have simple means to get from a subdevice to the underlying physical device. This patch adds such a pointer to struct v4l2_subdev and sets it accordingly in the I2C and SPI cases. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2014-11-18[media] V4L2: add temporary clock helpersGuennadi Liakhovetski1-0/+54
Typical video devices like camera sensors require an external clock source. Many such devices cannot even access their hardware registers without a running clock. These clock sources should be controlled by their consumers. This should be performed, using the generic clock framework. Unfortunately so far only very few systems have been ported to that framework. This patch adds a set of temporary helpers, mimicking the generic clock API, to V4L2. Platforms, adopting the clock API, should switch to using it. Eventually this temporary API should be removed. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2014-11-18clk: Implement clk_unregisterSylwester Nawrocki1-0/+2
clk_unregister() is currently not implemented and it is required when a clock provider module needs to be unloaded. Normally the clock supplier module is prevented to be unloaded by taking reference on the module in clk_get(). For cases when the clock supplier module deinitializes despite the consumers of its clocks holding a reference on the module, e.g. when the driver is unbound through "unbind" sysfs attribute, there are empty clock ops added. These ops are assigned temporarily to struct clk and used until all consumers release the clock, to avoid invoking callbacks from the module which just got removed. Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- Changes since v6: - fixed handling of NULL clk in clk_unregister(), clk pointer checks done before taking prepare_lock, pr_err() replaced with WARN_ON_ONCE. Changes since v5: - ensure clk->kref is not referenced when the passed clk is NULL. Changes since v4: - none. Changes since v3: - Use WARN_ON_ONCE() rather than WARN_ON() in clk_nodrv_disable_unprepare() callback. Changes since v2: - none. Changes since RFC v1: - renamed clk_dummy_* to clk_nodrv_*. Changes since v3 of the original patch [1]: - reparent all children to the orphan list instead of leaving the clock unregistered when it has child clocks, - removed unnecessary prerequisite checks in clk_debug_unregister(), - struct clk is now being freed only when the last clock consumer calls clk_put(), - empty clock ops are used after clk_unregister() has been called until all references to the clock are released and the clock object is freed. [1] http://www.spinics.net/lists/arm-kernel/msg247548.html
2014-11-18clk: Add common __clk_get(), __clk_put() implementationsSylwester Nawrocki2-0/+8
This patch adds common __clk_get(), __clk_put() clkdev helpers which replace their platform specific counterparts when the common clock API is enabled. The owner module pointer field is added to struct clk so a reference to the clock supplier module can be taken by the clock consumers. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> --- Changes since v5: - none. Changes since v4: - dropped unnecessary struct module forward declaration from clk-provider.h Changes since v3: - dropped exporting of __clk_get(), __clk_put(). Changes since v2: - fixed handling of NULL clock pointers in __clk_get(), __clk_put();
2014-11-18dmabuf-sync: update it to patch v8Inki Dae1-13/+80
- Consider the write-and-then-read ordering. The ordering issue means that a task don't take a lock to the dmabuf so this task would be stalled even though this task requested a lock to the dmabuf between other task unlocked and tries to lock the dmabuf again. For this, it addes a wait event mechanism using only generic APIs, wait_event_timeout and wake_up functions. The below is how to handle the ordering issue using this mechanism: 1. Check if there is a sync object added prior to current task's one. 2. If exists, it unlocks the dmabuf so that other task can take a lock to the dmabuf first. 3. Wait for the wake up event from other task: current task will be waked up when other task unlocks the dmabuf. 4. Take a lock to the dmabuf again. - Update Document - Code cleanups. Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-11-18mfd: max8998: Add support for Device TreeTomasz Figa2-0/+4
This patch adds Device Tree support to max8998 driver. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-11-18regulator: max8998: Use arrays for specifying voltages in platform dataTomasz Figa1-12/+4
This patch modifies the platform data of max8998 to use arrays for specifying predefined voltages of buck1 and buck2 instead of separate field for each voltage. This allows to simplify the code a bit and will help in adding support for Device Tree, which will be introduced in further patch. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2014-11-18mfd: max8998: Add irq domain supportTomasz Figa2-2/+5
This patch adds irq domain support for max8998 interrupts. To keep both non-DT and DT worlds happy, simple domain is used, which is linear when no explicit IRQ base is specified and legacy, with static mapping, otherwise. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>