linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Question about memory resources
@ 2010-03-11 22:48 H Hartley Sweeten
  2010-03-12 11:25 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2010-03-11 22:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hello all,

I have written a backlight driver for the ep93xx.  The backlight
on this system is controlled by a pwm output with a single control
register.  This register is located in the memory resource used
by the ep93xx framebuffer.

The framebuffer uses the following resource:

static struct resource ep93xx_fb_resource[] = {
	{
		.start	= EP93XX_RASTER_PHYS_BASE,
		.end		= EP93XX_RASTER_PHYS_BASE + 0x800 - 1,
		.flags	= IORESOURCE_MEM,
	},
};

The backlight would use this resource:

static struct resource ep93xx_bl_resource[] = {
	{
		.start	= EP93XX_RASTER_PHYS_BASE + 0x20,
		.end		= EP93XX_RASTER_PHYS_BASE + 0x23,
		.flags	= IORESOURCE_MEM,
	},
};

Unfortunately this doesn't work because the request_mem_region
call fails when the second device is probed since the first
device already did a request_mem_region and it was marked as
IORESOURCE_BUSY.

Is there any way to handle this other than using the static i/o
mapping for the backlight register?

Regards,
Hartley

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Question about memory resources
  2010-03-11 22:48 Question about memory resources H Hartley Sweeten
@ 2010-03-12 11:25 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2010-03-12 11:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 11, 2010 at 04:48:45PM -0600, H Hartley Sweeten wrote:

> Is there any way to handle this other than using the static i/o
> mapping for the backlight register?

The standard thing would be a MFD, or a single driver that exports both
interfaces.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-12 11:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-11 22:48 Question about memory resources H Hartley Sweeten
2010-03-12 11:25 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).