Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp782078rwl; Fri, 4 Nov 2022 06:24:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM74oWVdmrugQcIWkZExlbLwGdA8oc2o/MgB9iNLO/jKOmgzmGRhRg1ybRSsVHQ6Yhycv2Mv X-Received: by 2002:a05:6a00:22c3:b0:56b:f793:5ad1 with SMTP id f3-20020a056a0022c300b0056bf7935ad1mr36224282pfj.58.1667568242719; Fri, 04 Nov 2022 06:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667568242; cv=none; d=google.com; s=arc-20160816; b=QlrvYRppGCtlTRsXvvy3C9ko/I9vvqj5GxGioIU/Jr5r4qBO2wTck6yBeofwPXNKrY y2UW4+3yQIyxna7zuzoC+1znz4sJHZAWOez3a/hR5JBgzs/KF5ifZKR+EzKcgcOfQ2dM 2p+FvsDnr2VHI1VWbMgACMQt7OoqdiKdFUj0sGeYlOslaVJVL2t5rXJYQ0C09LmQmKwS vdBdAw9G3HxLkK0CHJOuXQ7BQ83wrT/+LkLmFw5NjyqvkaU0EWG8OZJrwC5kpIh5I3fh dJ6fXqqSKUuZxCS+j1Bp08s3nZSci1saMZTJyq8JVWKPyFkZ/gBW7LWsmxn+0Jr+TMuz kgvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=HCg5U14h823fd/E6HfvfZMyPQS0BVVOBKdKh70+tEco=; b=KDKCeDeC5KFuEpZB+DR509BDEKqC/eMsHfNsrBF5F7lYbzL7YWhctqWkDzYtizlKMd YQK/+ZvRnx+nlA6u4fk0Z8OBCGIVbb4/pVLpM4iUd8K1M5ylmnAyuOqtbWdS2zWKCc/e E01OgknEaNNCFXqccV3ktiOCAcEQhjiWZ2h8Dn3rW3dvH1l5Cwk9Xt3+yZ+v0EGgDGWc K+JPiWVBEwBOAtwsdC3tkCGtkITF23JzvR+/zivwgoHdY/12vbmTs8+Ki3K0T+RBoZYA LYYlx1vc+1e4W99L9+pCa/SeGpKtPyXve08+s0EEDt8N3XNVdAmg4dXEKNIVy0Zj4HH0 /CCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MURPBtT6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lj10-20020a17090b344a00b00202c7f4631esi3053723pjb.19.2022.11.04.06.23.49; Fri, 04 Nov 2022 06:24:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MURPBtT6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231953AbiKDMur (ORCPT + 97 others); Fri, 4 Nov 2022 08:50:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230132AbiKDMup (ORCPT ); Fri, 4 Nov 2022 08:50:45 -0400 Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49865EE31; Fri, 4 Nov 2022 05:50:44 -0700 (PDT) Received: by mail-qt1-x82f.google.com with SMTP id x15so2915617qtv.9; Fri, 04 Nov 2022 05:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=HCg5U14h823fd/E6HfvfZMyPQS0BVVOBKdKh70+tEco=; b=MURPBtT6SMZEFPvlZ8dHt6QTCIs5u7eDlYRQ3df41UwWgEh9kUXPkmMZbegcaIqQc+ VtdIXBcpivNIG+MwsAxsi1gWcu27Lg+p+1EfAm4iqF9bGgY6GUKPc7Coa1GZd+aSuQpZ cXBptuU89TH8TrYCxBaIPooysc3ftyCMwDudNaGqymcrcll4CalAqI4IwaTmTPFv8WxF BpT3inRmHsyD8O1+hpHeg48LJqJC7MyrjE1mbeK/ug/m6tUboARBrx5FWHxMDRb9LZCJ TXcoY68JAzPx5dIxdG9DXMVWbZiZkZnnQqyXhzKK3bntebhaK8f3coZjgVRxRFBOyDke bVbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HCg5U14h823fd/E6HfvfZMyPQS0BVVOBKdKh70+tEco=; b=vL3ahOlA0IVmC/ne0uLgAB7P6YQQ3OcreSG9sZcGjgLU4iU+NllphU2RuMSt4gRR6V NyoBV/fbEP+sCygcj5TqWJ/7JYx9uwqs0e5syqHOgnhbDRDDbfEHk6QUQQIMdweJXREs /6I2Io44DtDzxrDWR2gfVlYQncir87yXRzaoxOON47TYMv7tIvZxYNBLI93joQ5tA41C VxJFwsTRevlUdEkXKBuam7adgmvQn4ABHdmrDGjgu3Y9y022ClQtFkyfEAFhJWSiaiJD xgd3lArW82ZCf+DQXQ9TSIIRnB+EQ3o//3onFuUJBGoobW3XZbaBM+hqJ6HNPLG6REhy RjGg== X-Gm-Message-State: ACrzQf0YRLzjfDqB8sucRIr8pnY0aHN7jx3Kn8E9gvtjaOZcmDKeR27J 1I900gnk495+++3Y0g9IxFtjsxJxtkNcF+mXRvOhHDKk1BU= X-Received: by 2002:ac8:7152:0:b0:3a5:2fa2:cd1a with SMTP id h18-20020ac87152000000b003a52fa2cd1amr18686625qtp.195.1667566243392; Fri, 04 Nov 2022 05:50:43 -0700 (PDT) MIME-Version: 1.0 References: <20221001061507.3508603-1-kumaravel.thiagarajan@microchip.com> <20221001061507.3508603-4-kumaravel.thiagarajan@microchip.com> In-Reply-To: From: Andy Shevchenko Date: Fri, 4 Nov 2022 14:50:07 +0200 Message-ID: Subject: Re: [PATCH v2 tty-next 3/3] 8250: microchip: pci1xxxx: Add power management functions to quad-uart driver. To: Tharunkumar.Pasumarthi@microchip.com Cc: Kumaravel.Thiagarajan@microchip.com, gregkh@linuxfoundation.org, jirislaby@kernel.org, ilpo.jarvinen@linux.intel.com, u.kleine-koenig@pengutronix.de, johan@kernel.org, wander@redhat.com, etremblay@distech-controls.com, macro@orcam.me.uk, geert+renesas@glider.be, jk@ozlabs.org, phil.edworthy@renesas.com, lukas@wunner.de, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, UNGLinuxDriver@microchip.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 4, 2022 at 12:23 PM wrote: > > From: Andy Shevchenko > > Sent: Monday, October 3, 2022 2:57 PM > > If you have similarities with 8250_pci, probably you need to split it to > > 8250_pcilib.c and share. (See how 8250_dw /8250_lpss are done in that > > sense.) > > All the functions used in 8250_pci1xxxx.c that have similarity with 8250_pci use registers > that are specific to our IP. The only function that can be moved to common library is the > setup_port. But, for that the first argument of setup_port must be changed to > 'struct pci_dev *dev' (priv->dev). Do you suggest doing this? So, you can create a common serial8250_setup_port(struct pci_dev *dev, ...) and call it from the static setup_port() inside 8250_pci.c. This way you won't introduce too many churn. -- With Best Regards, Andy Shevchenko