From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753395AbbCISvo (ORCPT ); Mon, 9 Mar 2015 14:51:44 -0400 Received: from mail-gw3-out.broadcom.com ([216.31.210.64]:17815 "EHLO mail-gw3-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751400AbbCISvk (ORCPT ); Mon, 9 Mar 2015 14:51:40 -0400 X-IronPort-AV: E=Sophos;i="5.11,369,1422950400"; d="scan'208";a="58829833" Message-ID: <54FDEBB6.1060400@broadcom.com> Date: Mon, 9 Mar 2015 11:51:34 -0700 From: Jonathan Richardson User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Dmitry Torokhov CC: Anatol Pomazau , Scott Branden , Rob Herring , Pawel Moll , "Mark Rutland" , Ian Campbell , Kumar Gala , "Greg Kroah-Hartman" , Jiri Slaby , , "linux-kernel@vger.kernel.org" , , Arnd Bergmann , Desmond Liu Subject: Re: [PATCH v2 1/1] serial: 8250_dw: Fix get_mctrl behaviour References: <1424997357-31487-1-git-send-email-jonathar@broadcom.com> <1424997357-31487-2-git-send-email-jonathar@broadcom.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15-03-09 11:40 AM, Dmitry Torokhov wrote: > On Thu, Feb 26, 2015 at 4:35 PM, Jonathan Richardson > wrote: >> @@ -334,6 +342,30 @@ static int dw8250_probe_of(struct uart_port *p, >> if (id >= 0) >> p->line = id; >> >> + if (of_property_read_bool(np, "dcd-override")) { >> + /* Always report DCD as active */ >> + data->msr_mask_on |= UART_MSR_DCD; >> + data->msr_mask_off |= UART_MSR_DDCD; >> + } >> + >> + if (of_property_read_bool(np, "dsr-override")) { >> + /* Always report DSR as active */ >> + data->msr_mask_on |= UART_MSR_DSR; >> + data->msr_mask_off |= UART_MSR_DDSR; >> + } >> + >> + if (of_property_read_bool(np, "cts-override")) { >> + /* Always report DSR as active */ >> + data->msr_mask_on |= UART_MSR_DSR; >> + data->msr_mask_off |= UART_MSR_DDSR; >> + } >> + >> + if (of_property_read_bool(np, "ri-override")) { >> + /* Always report Ring indicator as inactive */ >> + data->msr_mask_off |= UART_MSR_RI; >> + data->msr_mask_off |= UART_MSR_TERI; > > This looks like a typo. Should the 1st line be data->msr_mask_on by any chance? I think the code is correct. The signals other than ri need to be reported as active (masked on) if specified, but ri needs to be inactive (masked off) unlike the other 3. This is stated in the kernel docs mentioned in the commit. ri behaves differently than the others. > > Thanks, > Dmitry > -- > 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/ > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Richardson Subject: Re: [PATCH v2 1/1] serial: 8250_dw: Fix get_mctrl behaviour Date: Mon, 9 Mar 2015 11:51:34 -0700 Message-ID: <54FDEBB6.1060400@broadcom.com> References: <1424997357-31487-1-git-send-email-jonathar@broadcom.com> <1424997357-31487-2-git-send-email-jonathar@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Dmitry Torokhov Cc: Anatol Pomazau , Scott Branden , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Greg Kroah-Hartman , Jiri Slaby , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Arnd Bergmann , Desmond Liu List-Id: devicetree@vger.kernel.org On 15-03-09 11:40 AM, Dmitry Torokhov wrote: > On Thu, Feb 26, 2015 at 4:35 PM, Jonathan Richardson > wrote: >> @@ -334,6 +342,30 @@ static int dw8250_probe_of(struct uart_port *p, >> if (id >= 0) >> p->line = id; >> >> + if (of_property_read_bool(np, "dcd-override")) { >> + /* Always report DCD as active */ >> + data->msr_mask_on |= UART_MSR_DCD; >> + data->msr_mask_off |= UART_MSR_DDCD; >> + } >> + >> + if (of_property_read_bool(np, "dsr-override")) { >> + /* Always report DSR as active */ >> + data->msr_mask_on |= UART_MSR_DSR; >> + data->msr_mask_off |= UART_MSR_DDSR; >> + } >> + >> + if (of_property_read_bool(np, "cts-override")) { >> + /* Always report DSR as active */ >> + data->msr_mask_on |= UART_MSR_DSR; >> + data->msr_mask_off |= UART_MSR_DDSR; >> + } >> + >> + if (of_property_read_bool(np, "ri-override")) { >> + /* Always report Ring indicator as inactive */ >> + data->msr_mask_off |= UART_MSR_RI; >> + data->msr_mask_off |= UART_MSR_TERI; > > This looks like a typo. Should the 1st line be data->msr_mask_on by any chance? I think the code is correct. The signals other than ri need to be reported as active (masked on) if specified, but ri needs to be inactive (masked off) unlike the other 3. This is stated in the kernel docs mentioned in the commit. ri behaves differently than the others. > > Thanks, > Dmitry > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html