Re: [PATCH 12/13 v3] OMAP: GPIO: Implement GPIO as a platform device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/15/2010 5:05 PM, Varadarajan, Charulatha wrote:
From: Charulatha V<charu@xxxxxx>

This patch implements GPIO as a platform device. Also it
implements OMAP2PLUS specific GPIO as HWMOD FW adapted device.
OMAP2PLUS GPIO uses runtime APIs.

GPIO APIs are used in machine_init functions. Hence it is
required to complete GPIO probe before machine_init. Therefore
GPIO device register and driver register are implemented as
postcore_initcalls.

Inorder to convert GPIO as platform device, modifications are
required in clockxxxx_data.c file for OMAP1 so that device names
can be used to obtain clock instead of getting clocks by
name/NULL ptr.

omap_gpio_init() does nothing now and this function would be
removed in the next patch as it's usage is spread across most of
the board files.

Signed-off-by: Charulatha V<charu@xxxxxx>
Signed-off-by: Rajendra Nayak<rnayak@xxxxxx>
---

[snip]


+static inline int init_gpio_info(struct platform_device *pdev)
+{
+       gpio_bank = kzalloc(gpio_bank_count * sizeof(struct gpio_bank),
+                               GFP_KERNEL);

This is the real issue with the gpio_bank_count.

You are creating a global driver information related to all instances of this device with a per device variable. You should store the registers per device, and that will remove the need for that global information.

Benoit
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux