Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5184152rwb; Sun, 4 Dec 2022 16:14:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf72K2wBnJZswlyb2pnFmAHYjAp443O6zftPPGOHY3cQ8VHy9w1hXCvWm5FSDsSBGav8OCrd X-Received: by 2002:a17:907:8198:b0:7c0:b0c8:32bf with SMTP id iy24-20020a170907819800b007c0b0c832bfmr13643899ejc.433.1670199270613; Sun, 04 Dec 2022 16:14:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670199270; cv=none; d=google.com; s=arc-20160816; b=WrFlj1sHUeFj4l6UPi0/w07Db6RsawdRvW/PyAasmqs/BZg5OfQGFydaPDzYcJahov zzmdqbs9mglWrilYv3/rFaWFbll+baFlsbQjEUQGz1AlX7bpac4rJfcrXo6VW80ipuAR DZzQOLiJDnR+gIzyR4rE81koPiTOzEcvpOJZb/l9Kj717IgXN+XP6ZoU/VLTOEnUhi9d cKiJaMI17GEY77qlTxDwDeqN3YKkIFC5KJ9V0NkPsTfN+bocrT9wtGn+6N7813Z0V0Kq FLtqkkDiYUFulCuWe0zBLSRaveN2MHOLuavRs7JJIpMfYBBb1Uowm/sc2AIV6/Ykikt9 Pf6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gHlZGpeZlTuBVPZFLOSWn4tUqUYQHoDhbXM9z/ibwxk=; b=z4xlgiHTlEA1iKRUxvtwXbrJnVeI0sYTXpPBUBYr8oHDMHwNNr892l+3f9TU6QIzUc kG4ynQBm0MwNpHTVu0xKfIlfq6XqH+1dVk1rxb95TcAAvTtvRB9YKjLNS385H7P9uvJj zOW+X5YMbWrxIOgzvlOBJO93y7ik78NSr5WSDV4EVakv61HKTN9TNcfFy9l9PsnwZTMQ BRFANRk8ttTmL1TwX5ZYi4WxUlE8YU1ht6MMmv8AJlZn+PPcCz6SjCswS/qg7l0Akpag 8SJ/uUQ1vGL3hMl48GFJyy3G+RwY9rXzKqCGlvb09UZzeoUxiUV6QNkuYXUekJkBGReq lerA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NVPCNqIY; 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 cw13-20020a056402228d00b0046b2f820e6esi10634688edb.124.2022.12.04.16.14.10; Sun, 04 Dec 2022 16:14:30 -0800 (PST) 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=NVPCNqIY; 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 S230378AbiLDXza (ORCPT + 84 others); Sun, 4 Dec 2022 18:55:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbiLDXzZ (ORCPT ); Sun, 4 Dec 2022 18:55:25 -0500 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77CB9B1FB; Sun, 4 Dec 2022 15:55:24 -0800 (PST) Received: by mail-pg1-x535.google.com with SMTP id h193so9015414pgc.10; Sun, 04 Dec 2022 15:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=gHlZGpeZlTuBVPZFLOSWn4tUqUYQHoDhbXM9z/ibwxk=; b=NVPCNqIYQwJ9riFBXF9JBy0G6xWfj+kYEuyG/U/R9TRpQlNH0ftWSX5J+oxMxU5RZI cp6krhYjoSadBWzHh4U0D0CbqBmnQ80pjtWYKW5USrbj4LMmMqDTZoH0WymauCZk5PLa f5THaB5h+f134C/UwnY3U0fVLlycd3mzSe65ilIIIMu1/6HkyLvymnZNIzarKelrwOb/ MwpTEc0FPShO2Ho3FGnJUOa66Pdv1YSwUU7GxXAoOewSP7Nh+DQNm4ykxMw6zVcY7BVZ RpeFezVWxW1/d3O1CJXnht0Aeh46fE4r1bb/67Z0455qAKKa3tYVWHLhNHCi6AVIiNC2 O6aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gHlZGpeZlTuBVPZFLOSWn4tUqUYQHoDhbXM9z/ibwxk=; b=Vs9tFYVABnj8/HNBzZPNSl5Y3LydGCFIzxMGtm3WgjGOdMY5/ygveG8WWvsY1IAjMy +GrJWHikzLy6AdXx0/O6ZcTnL7dpAc+PteH0idM2vSLLg0sXX57dCLDJ9MG3g0ZrMp7J U/KVYaYpN5guq/bZ5Bvr8mRDlJxfRhpuZ3a1vPzt27qEW+ZC5h3waiwrMB69Xu0Szixt AUiA5u5XuYmSbwYpcqoBC7gDSqY1fVfa73w6aFvO57q+qdN3OtwonMwopQbzZR3Kux5c urRoRBuJaFedD6YQKL6DVr3usaYrMV2qUekbXgqCF5R/yc7C94f2ozi8qwmKkrPe7SIH tXvQ== X-Gm-Message-State: ANoB5pkSRE/PA9rjGk01sTvYX9sVyrLZdhJFNPWZuea+1127/XJCmwFq i8JXjq7buJKXq1Yb+7Wx6qc= X-Received: by 2002:a63:cd44:0:b0:478:1391:fc43 with SMTP id a4-20020a63cd44000000b004781391fc43mr31855466pgj.431.1670198123613; Sun, 04 Dec 2022 15:55:23 -0800 (PST) Received: from google.com ([2620:15c:9d:2:ea63:b7ba:2a89:fec]) by smtp.gmail.com with ESMTPSA id b65-20020a62cf44000000b0056f0753390csm8802078pfg.96.2022.12.04.15.55.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Dec 2022 15:55:22 -0800 (PST) Date: Sun, 4 Dec 2022 15:55:19 -0800 From: Dmitry Torokhov To: Arnd Bergmann Cc: soc@kernel.org, Li Yang , Qiang Zhao , Greg Kroah-Hartman , Linus Walleij , Andy Shevchenko , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [RESEND PATCH] soc: fsl: qe: request pins non-exclusively Message-ID: References: <81a7715b-559f-4c5c-bdb6-1aa00d409155@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <81a7715b-559f-4c5c-bdb6-1aa00d409155@app.fastmail.com> 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 Sun, Dec 04, 2022 at 01:10:19PM +0100, Arnd Bergmann wrote: > On Sun, Dec 4, 2022, at 05:50, Dmitry Torokhov wrote: > > > > SoC team, the problematic patch has been in next for a while and it > > would be great to get the fix in to make sure the driver is not broken > > in 6.2. Thanks! > > I have no problem taking thsi patch, but I get a merge conflict that > I'm not sure how to resolve: > > > @@@ -186,23 -182,27 +180,43 @@@ struct qe_pin *qe_pin_request(struct de > if (WARN_ON(!gc)) { > err = -ENODEV; > goto err0; > ++<<<<<<< HEAD > + } > + qe_pin->gpiod = gpiod; > + qe_pin->controller = gpiochip_get_data(gc); > + /* > + * FIXME: this gets the local offset on the gpio_chip so that the driver > + * can manipulate pin control settings through its custom API. The real > + * solution is to create a real pin control driver for this. > + */ > + qe_pin->num = gpio_chip_hwgpio(gpiod); > + > + if (!of_device_is_compatible(gc->of_node, "fsl,mpc8323-qe-pario-bank")) { > + pr_debug("%s: tried to get a non-qe pin\n", __func__); > + gpiod_put(gpiod); > ++======= > + } else if (!fwnode_device_is_compatible(gc->fwnode, > + "fsl,mpc8323-qe-pario-bank")) { > + dev_dbg(dev, "%s: tried to get a non-qe pin\n", __func__); > ++>>>>>>> soc: fsl: qe: request pins non-exclusively > err = -EINVAL; > - goto err0; > + } else { > + qe_pin->controller = gpiochip_get_data(gc); > + /* > + * FIXME: this gets the local offset on the gpio_chip so that > + * the driver can manipulate pin control settings through its > + * custom API. The real solution is to create a real pin control > + * driver for this. > + */ > + qe_pin->num = desc_to_gpio(gpiod) - gc->base; > } > > Could you rebase the patch on top of the soc/driver branch in the > soc tree and send the updated version? I see, it conflicts with: c9eb6e546a23 soc: fsl: qe: Switch to use fwnode instead of of_node that is in next but not in soc/driver tree/branch. OK, I'll rebase and I just noticed that I was leaking gpiod in case we could not locate gc (unlikely but still...). Thanks. -- Dmitry