@@ -541,9 +541,9 @@ static const struct irq_domain_ops regmap_domain_ops = {
541541};
542542
543543/**
544- * regmap_add_irq_chip_np () - Use standard regmap IRQ controller handling
544+ * regmap_add_irq_chip_fwnode () - Use standard regmap IRQ controller handling
545545 *
546- * @np : The device_node where the IRQ domain should be added to.
546+ * @fwnode : The firmware node where the IRQ domain should be added to.
547547 * @map: The regmap for the device.
548548 * @irq: The IRQ the device uses to signal interrupts.
549549 * @irq_flags: The IRQF_ flags to use for the primary interrupt.
@@ -557,10 +557,11 @@ static const struct irq_domain_ops regmap_domain_ops = {
557557 * register cache. The chip driver is responsible for restoring the
558558 * register values used by the IRQ controller over suspend and resume.
559559 */
560- int regmap_add_irq_chip_np (struct device_node * np , struct regmap * map , int irq ,
561- int irq_flags , int irq_base ,
562- const struct regmap_irq_chip * chip ,
563- struct regmap_irq_chip_data * * data )
560+ int regmap_add_irq_chip_fwnode (struct fwnode_handle * fwnode ,
561+ struct regmap * map , int irq ,
562+ int irq_flags , int irq_base ,
563+ const struct regmap_irq_chip * chip ,
564+ struct regmap_irq_chip_data * * data )
564565{
565566 struct regmap_irq_chip_data * d ;
566567 int i ;
@@ -771,10 +772,12 @@ int regmap_add_irq_chip_np(struct device_node *np, struct regmap *map, int irq,
771772 }
772773
773774 if (irq_base )
774- d -> domain = irq_domain_add_legacy (np , chip -> num_irqs , irq_base ,
775+ d -> domain = irq_domain_add_legacy (to_of_node (fwnode ),
776+ chip -> num_irqs , irq_base ,
775777 0 , & regmap_domain_ops , d );
776778 else
777- d -> domain = irq_domain_add_linear (np , chip -> num_irqs ,
779+ d -> domain = irq_domain_add_linear (to_of_node (fwnode ),
780+ chip -> num_irqs ,
778781 & regmap_domain_ops , d );
779782 if (!d -> domain ) {
780783 dev_err (map -> dev , "Failed to create IRQ domain\n" );
@@ -808,7 +811,7 @@ int regmap_add_irq_chip_np(struct device_node *np, struct regmap *map, int irq,
808811 kfree (d );
809812 return ret ;
810813}
811- EXPORT_SYMBOL_GPL (regmap_add_irq_chip_np );
814+ EXPORT_SYMBOL_GPL (regmap_add_irq_chip_fwnode );
812815
813816/**
814817 * regmap_add_irq_chip() - Use standard regmap IRQ controller handling
@@ -822,15 +825,15 @@ EXPORT_SYMBOL_GPL(regmap_add_irq_chip_np);
822825 *
823826 * Returns 0 on success or an errno on failure.
824827 *
825- * This is the same as regmap_add_irq_chip_np , except that the device
828+ * This is the same as regmap_add_irq_chip_fwnode , except that the firmware
826829 * node of the regmap is used.
827830 */
828831int regmap_add_irq_chip (struct regmap * map , int irq , int irq_flags ,
829832 int irq_base , const struct regmap_irq_chip * chip ,
830833 struct regmap_irq_chip_data * * data )
831834{
832- return regmap_add_irq_chip_np ( map -> dev -> of_node , map , irq , irq_flags ,
833- irq_base , chip , data );
835+ return regmap_add_irq_chip_fwnode ( dev_fwnode ( map -> dev ) , map , irq ,
836+ irq_flags , irq_base , chip , data );
834837}
835838EXPORT_SYMBOL_GPL (regmap_add_irq_chip );
836839
@@ -899,10 +902,10 @@ static int devm_regmap_irq_chip_match(struct device *dev, void *res, void *data)
899902}
900903
901904/**
902- * devm_regmap_add_irq_chip_np () - Resource manager regmap_add_irq_chip_np ()
905+ * devm_regmap_add_irq_chip_fwnode () - Resource managed regmap_add_irq_chip_fwnode ()
903906 *
904907 * @dev: The device pointer on which irq_chip belongs to.
905- * @np : The device_node where the IRQ domain should be added to.
908+ * @fwnode : The firmware node where the IRQ domain should be added to.
906909 * @map: The regmap for the device.
907910 * @irq: The IRQ the device uses to signal interrupts
908911 * @irq_flags: The IRQF_ flags to use for the primary interrupt.
@@ -915,11 +918,12 @@ static int devm_regmap_irq_chip_match(struct device *dev, void *res, void *data)
915918 * The ®map_irq_chip_data will be automatically released when the device is
916919 * unbound.
917920 */
918- int devm_regmap_add_irq_chip_np (struct device * dev , struct device_node * np ,
919- struct regmap * map , int irq , int irq_flags ,
920- int irq_base ,
921- const struct regmap_irq_chip * chip ,
922- struct regmap_irq_chip_data * * data )
921+ int devm_regmap_add_irq_chip_fwnode (struct device * dev ,
922+ struct fwnode_handle * fwnode ,
923+ struct regmap * map , int irq ,
924+ int irq_flags , int irq_base ,
925+ const struct regmap_irq_chip * chip ,
926+ struct regmap_irq_chip_data * * data )
923927{
924928 struct regmap_irq_chip_data * * ptr , * d ;
925929 int ret ;
@@ -929,8 +933,8 @@ int devm_regmap_add_irq_chip_np(struct device *dev, struct device_node *np,
929933 if (!ptr )
930934 return - ENOMEM ;
931935
932- ret = regmap_add_irq_chip_np ( np , map , irq , irq_flags , irq_base ,
933- chip , & d );
936+ ret = regmap_add_irq_chip_fwnode ( fwnode , map , irq , irq_flags , irq_base ,
937+ chip , & d );
934938 if (ret < 0 ) {
935939 devres_free (ptr );
936940 return ret ;
@@ -941,7 +945,7 @@ int devm_regmap_add_irq_chip_np(struct device *dev, struct device_node *np,
941945 * data = d ;
942946 return 0 ;
943947}
944- EXPORT_SYMBOL_GPL (devm_regmap_add_irq_chip_np );
948+ EXPORT_SYMBOL_GPL (devm_regmap_add_irq_chip_fwnode );
945949
946950/**
947951 * devm_regmap_add_irq_chip() - Resource manager regmap_add_irq_chip()
@@ -964,8 +968,9 @@ int devm_regmap_add_irq_chip(struct device *dev, struct regmap *map, int irq,
964968 const struct regmap_irq_chip * chip ,
965969 struct regmap_irq_chip_data * * data )
966970{
967- return devm_regmap_add_irq_chip_np (dev , map -> dev -> of_node , map , irq ,
968- irq_flags , irq_base , chip , data );
971+ return devm_regmap_add_irq_chip_fwnode (dev , dev_fwnode (map -> dev ), map ,
972+ irq , irq_flags , irq_base , chip ,
973+ data );
969974}
970975EXPORT_SYMBOL_GPL (devm_regmap_add_irq_chip );
971976
0 commit comments