All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Wool <vitalhome@rbcmail.ru>
To: Grigory Tolstolytkin <gtolstolytkin@dev.rtsoft.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 8250 serial driver and PM
Date: Wed, 31 Aug 2005 14:57:07 +0400	[thread overview]
Message-ID: <43158D03.6040004@rbcmail.ru> (raw)
In-Reply-To: <43134BF8.1090706@dev.rtsoft.ru>

Hi Grigory,
it's unclear from your letter where you take pnx4008_uart_pm from. Can 
you please elaborate?

What I would think of if I were you is adding a field 'pm' to struct 
plat_serial8250_port which is filled in in the architecture-specific 
part and setting up->pm accrodingly.
I'll send a patch that may be of a help for you shortly.

Best regards,
   Vitaly


Grigory Tolstolytkin wrote:

> Hi,
>
> I'm working on power management support for a particular ARM based 
> board and I've got a question:
> I want to add a board specific power management for standard uart 
> driver (serial8250). For this purpose there is a special hook defined 
> in uart_8250_port structure (drivers/serial/8250.c):
> ...
> >        /*
> >        * We provide a per-port pm hook.
> >         */
> >        void                    (*pm)(struct uart_port *port,
> >                                      unsigned int state, unsigned 
> int old);
> ...
>
> When driver goes into suspend/resume, serial8250_pm() function is 
> called and it checks for the hook and executes it if it exists. But I 
> didn't find a proper way to assign my own function to this hook.
> How this hook is supposed to be changed? Is there a way to correctly 
> initialize it and how it should be done?
> Whether it's a good way to initialize it, for example, in 
> serial8250_isa_init_ports():
> ...
>                up->mcr_mask = ~ALPHA_KLUDGE_MCR;
>                up->mcr_force = ALPHA_KLUDGE_MCR;
>
>                up->port.ops = &serial8250_pops;
>
> #ifdef CONFIG_ARCH_XXX
>                up->pm = pnx4008_uart_pm;
> #endif
>       }
> ...
>
> Or it's a bad manner?
>
> Any help appreciated,
>
> Thanks,
> Grigory.
>
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
>


      parent reply	other threads:[~2005-08-31 10:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-29 17:55 8250 serial driver and PM Grigory Tolstolytkin
2005-08-31 10:08 ` Russell King
2005-08-31 10:57 ` Vitaly Wool [this message]

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=43158D03.6040004@rbcmail.ru \
    --to=vitalhome@rbcmail.ru \
    --cc=gtolstolytkin@dev.rtsoft.ru \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.