public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@nokia.com>
To: ext Sebastien Jan <s-jan@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Chinea Carlos (Nokia-D/Helsinki)" <Carlos.Chinea@nokia.com>
Subject: Re: [RFC PATCH 2/9] HSI: Low Level Driver core
Date: Fri, 30 Oct 2009 14:56:43 +0200	[thread overview]
Message-ID: <20091030125643.GK31472@nokia.com> (raw)
In-Reply-To: <1256896808-20152-3-git-send-email-s-jan@ti.com>

Hi,

On Fri, Oct 30, 2009 at 11:00:01AM +0100, ext Sebastien Jan wrote:
> +static int __init reg_hsi_dev_ch(struct hsi_dev *hsi_ctrl, unsigned int p,
> +                                unsigned int ch)
> +{
> +       struct hsi_device *dev;
> +       struct hsi_port *port = &hsi_ctrl->hsi_port[p];
> +       int err;
> +
> +       dev = kzalloc(sizeof(*dev), GFP_KERNEL);
> +       if (!dev)
> +               return -ENOMEM;
> +
> +       dev->n_ctrl = hsi_ctrl->id;
> +       dev->n_p = p;
> +       dev->n_ch = ch;
> +       dev->ch = &port->hsi_channel[ch];
> +       dev->device.bus = &hsi_bus_type;
> +       dev->device.parent = hsi_ctrl->dev;
> +       dev->device.release = hsi_dev_release;
> +       if (dev->n_ctrl < 0)
> +               dev_set_name(&dev->device, "omap_hsi-p%u.c%u", p, ch);
> +       else
> +               dev_set_name(&dev->device, "omap_hsi%d-p%u.c%u", dev->n_ctrl, p,
> +                            ch);
> +
> +       err = device_register(&dev->device);
> +       if (err >= 0) {
> +               write_lock_bh(&port->hsi_channel[ch].rw_lock);
> +               port->hsi_channel[ch].dev = dev;
> +               write_unlock_bh(&port->hsi_channel[ch].rw_lock);
> +       } else {
> +               kfree(dev);
> +       }
> +       return err;
> +}

this will make a client's probe() function to be called twice, no ??

you should/could have a hsi_new_dummy() like on i2c ??

> +static int __init hsi_request_mpu_irq(struct hsi_port *hsi_p)

this should be done by hsi-omap.ko driver.

> +static int __init hsi_request_cawake_irq(struct hsi_port *hsi_p)

ditto.

> +static int __init hsi_ports_init(struct hsi_dev *hsi_ctrl)

ditto.

> +static int __init hsi_request_gdd_irq(struct hsi_dev *hsi_ctrl)

ditto.

> +static int __init hsi_controller_init(struct hsi_dev *hsi_ctrl,
> +                                     struct platform_device *pd)

ditto.

-- 
balbi

  reply	other threads:[~2009-10-30 12:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-30  9:59 [RFC PATCH 0/9] MIPI HSI device support for OMAP platforms Sebastien Jan
2009-10-30 10:00 ` [RFC PATCH 1/9] HSI: Low Level Driver interface Sebastien Jan
2009-10-30 12:49   ` Felipe Balbi
2009-10-30 10:00 ` [RFC PATCH 2/9] HSI: Low Level Driver core Sebastien Jan
2009-10-30 12:56   ` Felipe Balbi [this message]
2009-10-30 10:00 ` [RFC PATCH 3/9] HSI: Low Level Driver device management Sebastien Jan
2009-10-30 10:00 ` [RFC PATCH 4/9] HSI: Low Level Driver debugfs support Sebastien Jan
2009-10-30 10:00 ` [RFC PATCH 5/9] HSI: Low Level Driver documentation Sebastien Jan
2009-10-30 10:00 ` [RFC PATCH 6/9] HSI: character driver interface Sebastien Jan
2009-10-30 10:00 ` [RFC PATCH 7/9] HSI: character driver low level interface Sebastien Jan
2009-10-30 10:00 ` [RFC PATCH 8/9] HSI: HSI device support Sebastien Jan
2009-10-30 10:00 ` [RFC PATCH 9/9] HSI: SSI device support and integration on 3430SDP platform Sebastien Jan
2009-10-30 12:57 ` [RFC PATCH 0/9] MIPI HSI device support for OMAP platforms Felipe Balbi
2009-10-30 14:32   ` Sebastien Jan
2009-10-30 17:58     ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091030125643.GK31472@nokia.com \
    --to=felipe.balbi@nokia.com \
    --cc=Carlos.Chinea@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=s-jan@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox