From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754877AbbLVLPX (ORCPT ); Tue, 22 Dec 2015 06:15:23 -0500 Received: from mail-lf0-f50.google.com ([209.85.215.50]:34522 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752467AbbLVLPT (ORCPT ); Tue, 22 Dec 2015 06:15:19 -0500 Subject: Re: [PATCH v5] extcon: add Maxim MAX3355 driver To: Chanwoo Choi References: <5948633.my3nAG6hRz@wasted.cogentembedded.com> <5676E214.2040009@cogentembedded.com> <5677662C.6060409@samsung.com> <5677DC21.3040509@cogentembedded.com> <5678A3BE.3040701@samsung.com> Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , "myungjoo.ham@samsung.com" , devicetree , linux-kernel , linux-sh@vger.kernel.org, linux-usb@vger.kernel.org From: Sergei Shtylyov Message-ID: <567930C3.3090600@cogentembedded.com> Date: Tue, 22 Dec 2015 14:15:15 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5678A3BE.3040701@samsung.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On 12/22/2015 4:13 AM, Chanwoo Choi wrote: >>>>> This patch depend on GPIOLIB configuration as following: >>>>> I modified it with following diff and applied it. >>>>> >>>>> diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig >>>>> index ba4db7d..3d89e60 100644 >>>>> --- a/drivers/extcon/Kconfig >>>>> +++ b/drivers/extcon/Kconfig >>>>> @@ -54,6 +54,7 @@ config EXTCON_MAX14577 >>>>> >>>>> config EXTCON_MAX3355 >>>>> tristate "Maxim MAX3355 USB OTG EXTCON Support" >>>>> + depends on GPIOLIB || COMPILE_TEST >>>> >>>> If it won't compile w/o gpiolib, what's the use of COMIPLE_TEST? >>>> And no, it shouldn't depend on gpiolib. It has empty stubs for the case of CONFIG_GPIOLIB=n. Obviously something is wrong with the GPIO headers, I'll look into it. >>> >>> Yes. When GPIOLIB is disabled, the build issue don't happen. >> >> What? It surely does happen! > > hmm.... > Sure. you need to check the include/linux/gpio/consumer.h. > > Because of build error happen, you miss to include the "linux/gpio/consumer.h" > header file in extcon-max3355.c. Please test it for enough time. Yes, with this file #include'd, it build fine now. >>> because include/linux/gpio/consumer.h implement the dummy function >>> for all gpio functions if CONFIG_GPIOLIB is disabled. >> >> Linus W. advised to #include this header explicitly -- I'll try and post. > > Don't necessary. I already updated it including the "include/linux/gpio/consumer.h". I saw that, yes. >>> For correct operation of max3355, you should add the dependency >>> to the extcon-max3355.c driver. This driver use the GPIO library >>> certainly. >> >> I disagree. The driver will just cease to load in this case. I don't see why we need such dependency. Only compilation time dependencies should be >> specified, I think. > > This driver have to depend on GPIOLIB. > Why are you disagreeing the COMPILE_TEST dependency? It is just compile test > without anything. I agree now. I still disagree about the gpiolib dependency though. MBR, Sergei