Commit Graph
873808 Commits
Author SHA1 Message Date
Lubomir Rintel ef071bab65 power: supply: olpc_battery: Allow building the driver on non-x86
With the recent changes to the driver and addition of OLPC XO-1.75 EC
driver it is possible to use this driver on ARM-based XO laptops as
well.

Signed-off-by: Lubomir Rintel <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 17:27:08 +03:00
Lubomir Rintel 231c0c2161 Platform: OLPC: Add a regulator for the DCON
All OLPC ECs are able to turn the power to the DCON on an off. Use the
regulator framework to expose the functionality.

Signed-off-by: Lubomir Rintel <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 17:27:08 +03:00
Lubomir Rintel 0c3d931b3a Platform: OLPC: Add XO-1.75 EC driver
It's based off the driver from the OLPC kernel sources. Somewhat
modernized and cleaned up, for better or worse.

Modified to plug into the olpc-ec driver infrastructure (so that battery
interface and debugfs could be reused) and the SPI slave framework.

Signed-off-by: Lubomir Rintel <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 17:27:08 +03:00
Lubomir Rintel 8097548f3a Platform: OLPC: Use BIT() and GENMASK() for event masks
Just a cosmetic tidy-up.

Signed-off-by: Lubomir Rintel <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 17:27:08 +03:00
Lubomir Rintel 560331eaee Platform: OLPC: Avoid a warning if the EC didn't register yet
Just return EPROBE_DEFER, so that whoever attempted to use the EC call can
defer their work.

Signed-off-by: Lubomir Rintel <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 17:27:08 +03:00
Lubomir Rintel ec9964b480 Platform: OLPC: Move EC-specific functionality out from x86
Move the olpc-ec driver away from the X86 OLPC platform so that it could be
used by the ARM based laptops too. Notably, the driver for the OLPC battery,
which is also used on the ARM models, builds on this driver's interface.

It is actually plaform independent: the OLPC EC commands with their argument
and responses are mostly the same despite the delivery mechanism is
different.

Signed-off-by: Lubomir Rintel <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 17:27:08 +03:00
Lubomir Rintel 2dc7863049 Platform: OLPC: Remove an unused include
Also, the header is x86 specific, while there are non-x86 OLPC machines.

Signed-off-by: Lubomir Rintel <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 17:27:08 +03:00
Lubomir Rintel f22558d701 dt-bindings: olpc,xo1.75-ec: Add OLPC XO-1.75 EC bindings
The OLPC XO-1.75 Embedded Controller is a SPI master that uses extra
signals for handshaking. It needs to know when is the slave (Linux)
side's TX FIFO ready for transfer (the ready-gpio signal on the SPI
controller node) and when does it wish to respond with a command (the
cmd-gpio property).

Signed-off-by: Lubomir Rintel <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 17:27:08 +03:00
Christoph Niedermaier 9783da2384 spi: spidev: Add dhcom-board to compatibility list
Prepare to use devices on the external SPI interface
on a DH electronics Development Board.

Signed-off-by: Christoph Niedermaier <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:27:01 +01:00
Steffen Dirkwinkel d6423bd030 platform/x86: pmc_atom: Add several Beckhoff Automation boards to critclk_systems DMI table
There are several Beckhoff Automation industrial PC boards which use
pmc_plt_clk* clocks for ethernet controllers. This adds affected boards
to critclk_systems DMI table so the clocks are marked as CLK_CRITICAL and
not turned off.

Fixes: 648e921888 ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Signed-off-by: Steffen Dirkwinkel <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 17:26:40 +03:00
Hans de Goede 3d0818f5eb platform/x86: pmc_atom: Add Lex 3I380D industrial PC to critclk_systems DMI table
The Lex 3I380D industrial PC has 4 ethernet controllers on board
which need pmc_plt_clk0 - 3 to function, add it to the critclk_systems
DMI table, so that drivers/clk/x86/clk-pmc-atom.c will mark the clocks
as CLK_CRITICAL and they will not get turned off.

Fixes: 648e921888 ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Reported-and-tested-by: Semyon Verchenko <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Acked-by: Andy Shevchenko <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 17:26:31 +03:00
Wolfram Sang 973af54c52 regulator: da9063: platform_data is gone, depend on OF
With OF being the only configuration possibility left, depend on it to
simplify some code.

Signed-off-by: Wolfram Sang <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Acked-by: Steve Twiss <[email protected]>
Tested-by: Steve Twiss <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:26:12 +01:00
Wolfram Sang 824bd1be3e regulator: da9063: move definitions out of a header into the driver
Those definitions are only used within the driver meanwhile, so put them
there.

Signed-off-by: Wolfram Sang <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Acked-by: Steve Twiss <[email protected]>
Tested-by: Steve Twiss <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:25:57 +01:00
Wolfram Sang 662307294f regulator: da9063: remove platform_data support
There are no in-kernel users anymore, so remove this outdated interface.

Signed-off-by: Wolfram Sang <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Acked-by: Steve Twiss <[email protected]>
Tested-by: Steve Twiss <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:25:42 +01:00
Daniel Baluta 2899872b62 regmap: debugfs: Fix memory leak in regmap_debugfs_init
As detected by kmemleak running on i.MX6ULL board:

nreferenced object 0xd8366600 (size 64):
  comm "swapper/0", pid 1, jiffies 4294937370 (age 933.220s)
  hex dump (first 32 bytes):
    64 75 6d 6d 79 2d 69 6f 6d 75 78 63 2d 67 70 72  dummy-iomuxc-gpr
    40 32 30 65 34 30 30 30 00 e3 f3 ab fe d1 1b dd  @20e4000........
  backtrace:
    [<b0402aec>] kasprintf+0x2c/0x54
    [<a6fbad2c>] regmap_debugfs_init+0x7c/0x31c
    [<9c8d91fa>] __regmap_init+0xb5c/0xcf4
    [<5b1c3d2a>] of_syscon_register+0x164/0x2c4
    [<596a5d80>] syscon_node_to_regmap+0x64/0x90
    [<49bd597b>] imx6ul_init_machine+0x34/0xa0
    [<250a4dac>] customize_machine+0x1c/0x30
    [<2d19fdaf>] do_one_initcall+0x7c/0x398
    [<e6084469>] kernel_init_freeable+0x328/0x448
    [<168c9101>] kernel_init+0x8/0x114
    [<913268aa>] ret_from_fork+0x14/0x20
    [<ce7b131a>] 0x0

Root cause is that map->debugfs_name is allocated using kasprintf
and then the pointer is lost by assigning it other memory address.

Reported-by: Stefan Wahren <[email protected]>
Signed-off-by: Daniel Baluta <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:23:29 +01:00
S.j. Wang 90fdbe8ab2 ASoC: cs42xx8: add reset-gpios in binding document
Add reset-gpios property, which is optional.

Signed-off-by: Shengjiu Wang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:21:56 +01:00
Kuninori Morimoto 2ffb0f580b ASoC: soc-core: WARN() is not related to component->driver->probe
soc_probe_component() has WARN() under if (component->driver->probe),
but, this WARN() check is not related to .probe callback.
So, it should be called at (B) instead of (A).
This patch moves it out of if().

	if (component->driver->probe) {
		ret = component->driver->probe(component);
		...
(A)		WARN(...)
	}
(B)	WARN(...)

Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:21:42 +01:00
Kuninori Morimoto e9b5daad4e ASoC: rsnd: move pcm_new from snd_soc_component_driver to snd_soc_dai_driver
snd_soc_dai_driver :: pcm_new has snd_soc_dai as parameter, but
snd_soc_component_driver :: pcm_new doesn't have it.

rsnd driver needs snd_soc_dai at pcm_new.
This patch moves .pcm_new from snd_soc_component_driver to
snd_soc_dai_driver, and don't use rtd->cpu_dai anymore.

Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:21:28 +01:00
Yong Zhi 39f2d114a1 ASoC: Intel: glk_rt5682_max98357a: Remap button control-function
Assign button functions based on Android wired headset specs(v1.1).

Signed-off-by: Yong Zhi <[email protected]>
Signed-off-by: Naveen Manohar <[email protected]>
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:21:15 +01:00
Shunli Wang 326b181763 ASoC: Mediatek: MT8183: enable IIR filter
IIR fileter can remove DC offset. It must be enabled when
dmic or amic connected to pmic is used.

Signed-off-by: Shunli Wang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:21:09 +01:00
Amir Goldstein b0a821daf0 ASoC: rename functions that pollute the simple_xxx namespace
include/linux/fs.h defines a bunch of simple fs helpers, (e.g.
simple_rename) and we intend to add an fs helper named simple_remove.

Rename the ASoC driver static functions, so they will not collide with
the upcoming fs helper function name.

Cc: Kuninori Morimoto <[email protected]>
Cc: Mark Brown <[email protected]>
Signed-off-by: Amir Goldstein <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:20:53 +01:00
Sathya Prakash M R 30d9d4ff53 ASoC: Intel: soc-acpi: Fix machine selection order
The selection order of m/c in match table is corrected
to use common codec as last in the list.

Signed-off-by: Sathya Prakash M R <[email protected]>
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:17:10 +01:00
Curtis Malainey 7b8164c1a2 ASoC: rt5677-spi: Handle over reading when flipping bytes
There is a case when a we want to read a large number of bytes that
require a burst but is not a multiple of the word size (8). When this
happens rt5677_spi_reverse will run off the end of the buffer. The
solution is to tell spi_reverse the actual size of the destination and
stop if we reach it even if we have data left that we read.

Cc: Ben Zhang <[email protected]>
Signed-off-by: Curtis Malainey <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:16:56 +01:00
Kuninori Morimoto f7c4842abf ASoC: soc-dpm: fixup DAI active unbalance
snd_soc_dai_link_event() is updating snd_soc_dai :: active,
but it is unbalance.
It counts up if it has startup callback.

	case SND_SOC_DAPM_PRE_PMU:
		...
		snd_soc_dapm_widget_for_each_source_path(w, path) {
			...
			if (source->driver->ops->startup) {
				...
=>				source->active++;
			}
			...
		}
		...

But, always counts down

	case SND_SOC_DAPM_PRE_PMD:
		...
		snd_soc_dapm_widget_for_each_source_path(w, path) {
			...
=>			source->active--;
			...
		}

This patch always counts up when SND_SOC_DAPM_PRE_PMD.

Signed-off-by: Kuninori Morimoto <[email protected]>
Reviewed-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
2019-05-20 15:16:42 +01:00
Kelsey Skunberg ef9ace6f80 tools: gpio: Add include/linux/gpio.h to .gitignore
File include/linux/gpio.h is generated after building
tools/testing/selftests

Add gpio.h to .gitignore to help clean up working tree status.

Signed-off-by: Kelsey Skunberg <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
2019-05-20 15:37:07 +02:00
Bartlomiej Zolnierkiewicz 73ee894360 Merge tag 'v5.2-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into fbdev-for-next
Linux 5.2-rc1

Sync with upstream (which now contains fbdev-v5.2 changes) to
prepare a base for fbdev-v5.3 changes.
2019-05-20 15:31:34 +02:00
Al Viro 48b48750c3 zsmalloc: don't bother with dentry_operations
Signed-off-by: Al Viro <[email protected]>
2019-05-20 14:09:46 +01:00
Al Viro 985f404487 balloon: don't bother with dentry_operations
Signed-off-by: Al Viro <[email protected]>
2019-05-20 14:09:46 +01:00
Al Viro 8b1e058e0f cxlflash: don't bother with dentry_operations
Signed-off-by: Al Viro <[email protected]>
2019-05-20 14:09:46 +01:00
Al Viro 619a6d167b cxl: don't bother with dentry_operations
default will do

Signed-off-by: Al Viro <[email protected]>
2019-05-20 14:09:46 +01:00
Al Viro fb9273f2c1 drm: don't bother with super_operations and dentry_operations
defaults will do just fine.

Signed-off-by: Al Viro <[email protected]>
2019-05-20 14:09:46 +01:00
kbuild test robot 201bd433bf drm/bochs: fix ptr_ret.cocci warnings
drivers/gpu/drm/bochs/bochs_mm.c:19:1-3: WARNING: PTR_ERR_OR_ZERO can be used

 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Fixes: b3a25b9af8 ("drm/bochs: Convert bochs driver to VRAM MM")
CC: Thomas Zimmermann <[email protected]>
Signed-off-by: kbuild test robot <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/20190520122314.GA155389@lkp-kbuild22
Signed-off-by: Gerd Hoffmann <[email protected]>
2019-05-20 15:01:56 +02:00
Kai-Heng Feng 670784fb4e pinctrl: intel: Clear interrupt status in mask/unmask callback
Commit a939bb57cd ("pinctrl: intel: implement gpio_irq_enable") was
added because clearing interrupt status bit is required to avoid
unexpected behavior.

Turns out the unmask callback also needs the fix, which can solve weird
IRQ triggering issues on I2C touchpad ELAN1200.

Signed-off-by: Kai-Heng Feng <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 15:04:25 +03:00
Andy Shevchenko e58926e781 pinctrl: intel: Use GENMASK() consistently
Use GENMASK() macro for all definitions.
No functional change intended.

Signed-off-by: Andy Shevchenko <[email protected]>
2019-05-20 15:04:25 +03:00
Kefeng Wang dd7450cab7 ipmi_si: use bool type for initialized variable
Cover 'int' to 'bool' type for initialized variable.

Signed-off-by: Kefeng Wang <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Corey Minyard <[email protected]>
2019-05-20 06:51:10 -05:00
Kefeng Wang 2f66353963 ipmi_si: fix unexpected driver unregister warning
If ipmi_si_platform_init()->platform_driver_register() fails,
platform_driver_unregister() called unconditionally will trigger
following warning,

ipmi_platform: Unable to register driver: -12
------------[ cut here ]------------
Unexpected driver unregister!
WARNING: CPU: 1 PID: 7210 at drivers/base/driver.c:193 driver_unregister+0x60/0x70 drivers/base/driver.c:193

Fix it by adding platform_registered variable, only unregister platform
driver when it is already successfully registered.

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Kefeng Wang <[email protected]>
Message-Id: <[email protected]>

Signed-off-by: Corey Minyard <[email protected]>
2019-05-20 06:51:10 -05:00
Fabrizio Castro 70ac79f5d1 dt-bindings: arm: renesas: Add HopeRun RZ/G2[M] boards
This patch adds board HiHope RZ/G2M (the main board, powered by
the R8A774A1) and board HiHope RZ/G2 EX (the expansion board
that sits on top of the HiHope RZ/G2M). Both boards are made
by Jiangsu HopeRun Software Co., Ltd. (a.k.a. HopeRun).

Useful links:
http://hihope.org/product/detail/rzg2
https://item.taobao.com/item.htm?spm=a2oq0.12575281.0.0.6bcf1debQpzkRS&ft=t&id=592177498472
http://www.hoperun.com/Cn/news/id/379

We already know that the HiHope RZ/G2 EX will also sit on the
HiHope RZ/G2N, even though the HiHope RZ/G2N doesn't exist just
yet.

Signed-off-by: Fabrizio Castro <[email protected]>
Reviewed-by: Chris Paterson <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
2019-05-20 13:48:05 +02:00
Paolo Bonzini 94830f188a Merge tag 'kvm-s390-master-5.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
KVM: s390: Fixes for s390

- Fix typo in module parameter description
- Change default poll timer to improve cpu consumption
2019-05-20 13:41:58 +02:00
Chris Brandt 003ddc67e6 ARM: dts: rza2mevb: Add USB Host support
Enable USB Host support for both the Type-C connector on the CPU board
and the Type-A plug on the sub board.

Both boards are also capable of USB Device operation as well after the
appropriate Device Tree modifications.

Signed-off-by: Chris Brandt <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
2019-05-20 13:41:47 +02:00
Chris Brandt f56e674dec ARM: dts: r7s9210: Add USB Device support
Add USB Device support for RZ/A2.

Signed-off-by: Chris Brandt <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
2019-05-20 13:41:21 +02:00
Chris Brandt 9d8c794e31 ARM: dts: r7s9210: Add USB Host support
Add EHCI and OHCI host support for RZ/A2.

Signed-off-by: Chris Brandt <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
2019-05-20 13:40:51 +02:00
Maxime Ripard b0f986b4b0 drm: Remove users of drm_format_info_plane_cpp
drm_format_info_plane_cpp() basically just returns the cpp array content
found in the drm_format_info structure.

Since it's pretty trivial, let's remove the function and have the users use
the array directly

Suggested-by: Ville Syrjälä <[email protected]>
Reviewed-by: Paul Kocialkowski <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/c0a78c87cd0410a1819edad2794ad06543c85bb5.1558002671.git-series.maxime.ripard@bootlin.com
2019-05-20 13:35:56 +02:00
Maxime Ripard 92f080762c drm: Replace instances of drm_format_info by drm_get_format_info
drm_get_format_info directly calls into drm_format_info, but takes directly
a struct drm_mode_fb_cmd2 pointer, instead of the fourcc directly. It's
shorter to not dereference it, and we can customise the behaviour at the
driver level if we want to, so let's switch to it where it makes sense.

Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Paul Kocialkowski <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/5859d68664b8f0804a56e7386937f6db986b9e0f.1558002671.git-series.maxime.ripard@bootlin.com
2019-05-20 13:35:40 +02:00
Maxime Ripard bf39607c16 drm/fourcc: Pass the format_info pointer to drm_format_plane_width/height
So far, the drm_format_plane_height/width functions were operating on the
format's fourcc and was doing a lookup to retrieve the drm_format_info
structure and return the cpp.

However, this is inefficient since in most cases, we will have the
drm_format_info pointer already available so we shouldn't have to perform a
new lookup. Some drm_fourcc functions also already operate on the
drm_format_info pointer for that reason, so the API is quite inconsistent
there.

Let's follow the latter pattern and remove the extra lookup while being a
bit more consistent.

In order to be extra consistent, also rename that function to
drm_format_info_plane_cpp and to a static function in the header to match
the current policy. The parameters order have also be changed to match the
other functions prototype.

Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Paul Kocialkowski <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/514af1d489d80b8b1767e3716b663ce5103da6eb.1558002671.git-series.maxime.ripard@bootlin.com
2019-05-20 13:35:24 +02:00
Maxime Ripard 24c478ead0 drm/fourcc: Pass the format_info pointer to drm_format_plane_cpp
So far, the drm_format_plane_cpp function was operating on the format's
fourcc and was doing a lookup to retrieve the drm_format_info structure and
return the cpp.

However, this is inefficient since in most cases, we will have the
drm_format_info pointer already available so we shouldn't have to perform a
new lookup. Some drm_fourcc functions also already operate on the
drm_format_info pointer for that reason, so the API is quite inconsistent
there.

Let's follow the latter pattern and remove the extra lookup while being a
bit more consistent. In order to be extra consistent, also rename that
function to drm_format_info_plane_cpp and to a static function in the
header to match the current policy.

Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Paul Kocialkowski <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/32aa13e53dbc98a90207fd290aa8e79f785fb11e.1558002671.git-series.maxime.ripard@bootlin.com
2019-05-20 13:33:46 +02:00
Maxime Ripard f3e9632cb6 drm: Remove users of drm_format_(horz|vert)_chroma_subsampling
drm_format_horz_chroma_subsampling and drm_format_vert_chroma_subsampling
are basically a lookup in the drm_format_info table plus an access to the
hsub and vsub fields of the appropriate entry.

Most drivers are using this function while having access to the entry
already, which means that we will perform an unnecessary lookup. Removing
the call to these functions is therefore more efficient.

Some drivers will not have access to that entry in the function, but in
this case the overhead is minimal (we just have to call drm_format_info()
to perform the lookup) and we can even avoid multiple, inefficient lookups
in some places that need multiple fields from the drm_format_info
structure.

This is amplified by the fact that most of the time the callers will have
to retrieve both the vsub and hsub fields, meaning that they would perform
twice the lookup.

Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Paul Kocialkowski <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/6b3cceb8161e2c1d40c2681de99202328b0a8abc.1558002671.git-series.maxime.ripard@bootlin.com
2019-05-20 13:33:11 +02:00
Maxime Ripard 05c452c115 drm: Remove users of drm_format_num_planes
drm_format_num_planes() is basically a lookup in the drm_format_info table
plus an access to the num_planes field of the appropriate entry.

Most drivers are using this function while having access to the entry
already, which means that we will perform an unnecessary lookup. Removing
the call to drm_format_num_planes is therefore more efficient.

Some drivers will not have access to that entry in the function, but in
this case the overhead is minimal (we just have to call drm_format_info()
to perform the lookup) and we can even avoid multiple, inefficient lookups
in some places that need multiple fields from the drm_format_info
structure.

Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Paul Kocialkowski <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/5ffcec9d14a50ed538e37d565f546802452ee672.1558002671.git-series.maxime.ripard@bootlin.com
2019-05-20 13:32:57 +02:00
Maxime Ripard 45babef01f drm/rockchip: Change the scl_vop_cal_scl_fac to pass drm_format_info
The Rockchip VOP driver has a function, scl_vop_cal_scl_fac, that will
lookup the drm_format_info structure from the fourcc passed to it by its
caller.

However, its only caller already derefences the drm_format_info structure
it has access to to retrieve that fourcc. Change the prototype of that
function to pass the drm_format_info structure directly, removing the need
for an extra lookup.

Reviewed-by: Paul Kocialkowski <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Suggested-by: Philipp Zabel <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/27b0041c7977402df4a087c78d2849ffe51c9f1c.1558002671.git-series.maxime.ripard@bootlin.com
2019-05-20 13:32:20 +02:00
Geert Uytterhoeven 35b81a037b ARM: dts: rskrza1: Add input switches
Add support for input switches SW1-3 on the Renesas RZ/A1 RSK+RZA1
development board.

Note that this uses the IRQ interrupts, as the RZ/A1 GPIO controller
does not include interrupt support.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
2019-05-20 13:27:35 +02:00
Geert Uytterhoeven bd6ed46743 ARM: dts: r7s72100: Add IRQC device node
Enable support for the IRQC on RZ/A1H, which is a small front-end to the
GIC.  This allows to use up to 8 external interrupts with configurable
sense select.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Simon Horman <[email protected]>
2019-05-20 13:26:45 +02:00